var EE=Object.defineProperty;var Mg=t=>{throw TypeError(t)};var _E=(t,e,n)=>e in t?EE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Le=(t,e,n)=>_E(t,typeof e!="symbol"?e+"":e,n),sd=(t,e,n)=>e.has(t)||Mg("Cannot "+n);var O=(t,e,n)=>(sd(t,e,"read from private field"),n?n.call(t):e.get(t)),me=(t,e,n)=>e.has(t)?Mg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),te=(t,e,n,s)=>(sd(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),Ae=(t,e,n)=>(sd(t,e,"access private method"),n);var gl=(t,e,n,s)=>({set _(o){te(t,e,o,n)},get _(){return O(t,e,s)}});function CE(t,e){for(var n=0;ns[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function Ff(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var id={exports:{}},yo={},od={exports:{}},Pe={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ig;function TE(){if(Ig)return Pe;Ig=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function w(j){return j===null||typeof j!="object"?null:(j=y&&j[y]||j["@@iterator"],typeof j=="function"?j:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P=Object.assign,E={};function S(j,$,de){this.props=j,this.context=$,this.refs=E,this.updater=de||_}S.prototype.isReactComponent={},S.prototype.setState=function(j,$){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,$,"setState")},S.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function b(){}b.prototype=S.prototype;function R(j,$,de){this.props=j,this.context=$,this.refs=E,this.updater=de||_}var k=R.prototype=new b;k.constructor=R,P(k,S.prototype),k.isPureReactComponent=!0;var N=Array.isArray,F=Object.prototype.hasOwnProperty,U={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function z(j,$,de){var ge,pe={},X=null,be=null;if($!=null)for(ge in $.ref!==void 0&&(be=$.ref),$.key!==void 0&&(X=""+$.key),$)F.call($,ge)&&!q.hasOwnProperty(ge)&&(pe[ge]=$[ge]);var Re=arguments.length-2;if(Re===1)pe.children=de;else if(1>>1,$=K[j];if(0>>1;jo(pe,B))X<$&&0>o(be,pe)?(K[j]=be,K[X]=B,j=X):(K[j]=pe,K[ge]=B,j=ge);else if(X<$&&0>o(be,B))K[j]=be,K[X]=B,j=X;else break e}}return se}function o(K,se){var B=K.sortIndex-se.sortIndex;return B!==0?B:K.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();t.unstable_now=function(){return u.now()-d}}var f=[],p=[],g=1,y=null,w=3,_=!1,P=!1,E=!1,S=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(K){for(var se=n(p);se!==null;){if(se.callback===null)s(p);else if(se.startTime<=K)s(p),se.sortIndex=se.expirationTime,e(f,se);else break;se=n(p)}}function N(K){if(E=!1,k(K),!P)if(n(f)!==null)P=!0,_e(F);else{var se=n(p);se!==null&&ce(N,se.startTime-K)}}function F(K,se){P=!1,E&&(E=!1,b(z),z=-1),_=!0;var B=w;try{for(k(se),y=n(f);y!==null&&(!(y.expirationTime>se)||K&&!ve());){var j=y.callback;if(typeof j=="function"){y.callback=null,w=y.priorityLevel;var $=j(y.expirationTime<=se);se=t.unstable_now(),typeof $=="function"?y.callback=$:y===n(f)&&s(f),k(se)}else s(f);y=n(f)}if(y!==null)var de=!0;else{var ge=n(p);ge!==null&&ce(N,ge.startTime-se),de=!1}return de}finally{y=null,w=B,_=!1}}var U=!1,q=null,z=-1,Y=5,ne=-1;function ve(){return!(t.unstable_now()-neK||125j?(K.sortIndex=B,e(p,K),n(f)===null&&K===n(p)&&(E?(b(z),z=-1):E=!0,ce(N,B-j))):(K.sortIndex=$,e(f,K),P||_||(P=!0,_e(F))),K},t.unstable_shouldYield=ve,t.unstable_wrapCallback=function(K){var se=w;return function(){var B=w;w=se;try{return K.apply(this,arguments)}finally{w=B}}}})(ud)),ud}var Bg;function AE(){return Bg||(Bg=1,ld.exports=RE()),ld.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var $g;function NE(){if($g)return It;$g=1;var t=zf(),e=AE();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},y={};function w(r){return f.call(y,r)?!0:f.call(g,r)?!1:p.test(r)?y[r]=!0:(g[r]=!0,!1)}function _(r,i,a,c){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function P(r,i,a,c){if(i===null||typeof i>"u"||_(r,i,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function E(r,i,a,c,h,m,x){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=r,this.type=i,this.sanitizeURL=m,this.removeEmptyString=x}var S={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){S[r]=new E(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];S[i]=new E(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){S[r]=new E(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){S[r]=new E(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){S[r]=new E(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){S[r]=new E(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){S[r]=new E(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){S[r]=new E(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){S[r]=new E(r,5,!1,r.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function R(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var i=r.replace(b,R);S[i]=new E(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(b,R);S[i]=new E(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(b,R);S[i]=new E(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){S[r]=new E(r,1,!1,r.toLowerCase(),null,!1,!1)}),S.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){S[r]=new E(r,1,!1,r.toLowerCase(),null,!0,!0)});function k(r,i,a,c){var h=S.hasOwnProperty(i)?S[i]:null;(h!==null?h.type!==0:c||!(2T||h[x]!==m[T]){var A=` `+h[x].replace(" at new "," at ");return r.displayName&&A.includes("")&&(A=A.replace("",r.displayName)),A}while(1<=x&&0<=T);break}}}finally{de=!1,Error.prepareStackTrace=a}return(r=r?r.displayName||r.name:"")?$(r):""}function pe(r){switch(r.tag){case 5:return $(r.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return r=ge(r.type,!1),r;case 11:return r=ge(r.type.render,!1),r;case 1:return r=ge(r.type,!0),r;default:return""}}function X(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case q:return"Fragment";case U:return"Portal";case Y:return"Profiler";case z:return"StrictMode";case Se:return"Suspense";case Z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case ve:return(r.displayName||"Context")+".Consumer";case ne:return(r._context.displayName||"Context")+".Provider";case Te:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case Ce:return i=r.displayName||null,i!==null?i:X(r.type)||"Memo";case _e:i=r._payload,r=r._init;try{return X(r(i))}catch{}}return null}function be(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(i);case 8:return i===z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Re(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function we(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function at(r){var i=we(r)?"checked":"value",a=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),c=""+r[i];if(!r.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,m=a.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return h.call(this)},set:function(x){c=""+x,m.call(this,x)}}),Object.defineProperty(r,i,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(x){c=""+x},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Gt(r){r._valueTracker||(r._valueTracker=at(r))}function ft(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var a=i.getValue(),c="";return r&&(c=we(r)?r.checked?"true":"false":r.value),r=c,r!==a?(i.setValue(r),!0):!1}function cn(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Xt(r,i){var a=i.checked;return B({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??r._wrapperState.initialChecked})}function Yt(r,i){var a=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;a=Re(i.value!=null?i.value:a),r._wrapperState={initialChecked:c,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Ee(r,i){i=i.checked,i!=null&&k(r,"checked",i,!1)}function ht(r,i){Ee(r,i);var a=Re(i.value),c=i.type;if(a!=null)c==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+a):r.value!==""+a&&(r.value=""+a);else if(c==="submit"||c==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?fn(r,i.type,a):i.hasOwnProperty("defaultValue")&&fn(r,i.type,Re(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function dn(r,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,a||i===r.value||(r.value=i),r.defaultValue=i}a=r.name,a!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,a!==""&&(r.name=a)}function fn(r,i,a){(i!=="number"||cn(r.ownerDocument)!==r)&&(a==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+a&&(r.defaultValue=""+a))}var nr=Array.isArray;function rr(r,i,a,c){if(r=r.options,i){i={};for(var h=0;h"+i.valueOf().toString()+"",i=la.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function Oi(r,i){if(i){var a=r.firstChild;if(a&&a===r.lastChild&&a.nodeType===3){a.nodeValue=i;return}}r.textContent=i}var Di={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kS=["Webkit","ms","Moz","O"];Object.keys(Di).forEach(function(r){kS.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Di[i]=Di[r]})});function Yh(r,i,a){return i==null||typeof i=="boolean"||i===""?"":a||typeof i!="number"||i===0||Di.hasOwnProperty(r)&&Di[r]?(""+i).trim():i+"px"}function Jh(r,i){r=r.style;for(var a in i)if(i.hasOwnProperty(a)){var c=a.indexOf("--")===0,h=Yh(a,i[a],c);a==="float"&&(a="cssFloat"),c?r.setProperty(a,h):r[a]=h}}var PS=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gu(r,i){if(i){if(PS[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function yu(r,i){if(r.indexOf("-")===-1)return typeof i.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var vu=null;function xu(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var wu=null,Os=null,Ds=null;function Zh(r){if(r=to(r)){if(typeof wu!="function")throw Error(n(280));var i=r.stateNode;i&&(i=Na(i),wu(r.stateNode,r.type,i))}}function ep(r){Os?Ds?Ds.push(r):Ds=[r]:Os=r}function tp(){if(Os){var r=Os,i=Ds;if(Ds=Os=null,Zh(r),i)for(r=0;r>>=0,r===0?32:31-(zS(r)/VS|0)|0}var ha=64,pa=4194304;function Ii(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function ma(r,i){var a=r.pendingLanes;if(a===0)return 0;var c=0,h=r.suspendedLanes,m=r.pingedLanes,x=a&268435455;if(x!==0){var T=x&~h;T!==0?c=Ii(T):(m&=x,m!==0&&(c=Ii(m)))}else x=a&~h,x!==0?c=Ii(x):m!==0&&(c=Ii(m));if(c===0)return 0;if(i!==0&&i!==c&&(i&h)===0&&(h=c&-c,m=i&-i,h>=m||h===16&&(m&4194240)!==0))return i;if((c&4)!==0&&(c|=a&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=c;0a;a++)i.push(r);return i}function Fi(r,i,a){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-hn(i),r[i]=a}function WS(r,i){var a=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var c=r.eventTimes;for(r=r.expirationTimes;0=qi),Rp=" ",Ap=!1;function Np(r,i){switch(r){case"keyup":return vb.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Op(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ms=!1;function wb(r,i){switch(r){case"compositionend":return Op(i);case"keypress":return i.which!==32?null:(Ap=!0,Rp);case"textInput":return r=i.data,r===Rp&&Ap?null:r;default:return null}}function Sb(r,i){if(Ms)return r==="compositionend"||!Fu&&Np(r,i)?(r=Ep(),wa=Ou=lr=null,Ms=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1=i)return{node:a,offset:i-r};r=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=zp(a)}}function Up(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Up(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Bp(){for(var r=window,i=cn();i instanceof r.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)r=i.contentWindow;else break;i=cn(r.document)}return i}function Uu(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function Ab(r){var i=Bp(),a=r.focusedElem,c=r.selectionRange;if(i!==a&&a&&a.ownerDocument&&Up(a.ownerDocument.documentElement,a)){if(c!==null&&Uu(a)){if(i=c.start,r=c.end,r===void 0&&(r=i),"selectionStart"in a)a.selectionStart=i,a.selectionEnd=Math.min(r,a.value.length);else if(r=(i=a.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var h=a.textContent.length,m=Math.min(c.start,h);c=c.end===void 0?m:Math.min(c.end,h),!r.extend&&m>c&&(h=c,c=m,m=h),h=Vp(a,m);var x=Vp(a,c);h&&x&&(r.rangeCount!==1||r.anchorNode!==h.node||r.anchorOffset!==h.offset||r.focusNode!==x.node||r.focusOffset!==x.offset)&&(i=i.createRange(),i.setStart(h.node,h.offset),r.removeAllRanges(),m>c?(r.addRange(i),r.extend(x.node,x.offset)):(i.setEnd(x.node,x.offset),r.addRange(i)))}}for(i=[],r=a;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,Is=null,Bu=null,Xi=null,$u=!1;function $p(r,i,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;$u||Is==null||Is!==cn(c)||(c=Is,"selectionStart"in c&&Uu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Xi&&Gi(Xi,c)||(Xi=c,c=Pa(Bu,"onSelect"),0Bs||(r.current=tc[Bs],tc[Bs]=null,Bs--)}function ze(r,i){Bs++,tc[Bs]=r.current,r.current=i}var fr={},wt=dr(fr),Ot=dr(!1),qr=fr;function $s(r,i){var a=r.type.contextTypes;if(!a)return fr;var c=r.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var h={},m;for(m in a)h[m]=i[m];return c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=h),h}function Dt(r){return r=r.childContextTypes,r!=null}function Oa(){Ue(Ot),Ue(wt)}function sm(r,i,a){if(wt.current!==fr)throw Error(n(168));ze(wt,i),ze(Ot,a)}function im(r,i,a){var c=r.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var h in c)if(!(h in i))throw Error(n(108,be(r)||"Unknown",h));return B({},a,c)}function Da(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||fr,qr=wt.current,ze(wt,r),ze(Ot,Ot.current),!0}function om(r,i,a){var c=r.stateNode;if(!c)throw Error(n(169));a?(r=im(r,i,qr),c.__reactInternalMemoizedMergedChildContext=r,Ue(Ot),Ue(wt),ze(wt,r)):Ue(Ot),ze(Ot,a)}var Vn=null,ja=!1,nc=!1;function am(r){Vn===null?Vn=[r]:Vn.push(r)}function Bb(r){ja=!0,am(r)}function hr(){if(!nc&&Vn!==null){nc=!0;var r=0,i=Ie;try{var a=Vn;for(Ie=1;r>=x,h-=x,Un=1<<32-hn(i)+h|a<xe?(ct=he,he=null):ct=he.sibling;var je=W(M,he,I[xe],G);if(je===null){he===null&&(he=ct);break}r&&he&&je.alternate===null&&i(M,he),D=m(je,D,xe),fe===null?ue=je:fe.sibling=je,fe=je,he=ct}if(xe===I.length)return a(M,he),$e&&Kr(M,xe),ue;if(he===null){for(;xexe?(ct=he,he=null):ct=he.sibling;var br=W(M,he,je.value,G);if(br===null){he===null&&(he=ct);break}r&&he&&br.alternate===null&&i(M,he),D=m(br,D,xe),fe===null?ue=br:fe.sibling=br,fe=br,he=ct}if(je.done)return a(M,he),$e&&Kr(M,xe),ue;if(he===null){for(;!je.done;xe++,je=I.next())je=Q(M,je.value,G),je!==null&&(D=m(je,D,xe),fe===null?ue=je:fe.sibling=je,fe=je);return $e&&Kr(M,xe),ue}for(he=c(M,he);!je.done;xe++,je=I.next())je=ee(he,M,xe,je.value,G),je!==null&&(r&&je.alternate!==null&&he.delete(je.key===null?xe:je.key),D=m(je,D,xe),fe===null?ue=je:fe.sibling=je,fe=je);return r&&he.forEach(function(bE){return i(M,bE)}),$e&&Kr(M,xe),ue}function Je(M,D,I,G){if(typeof I=="object"&&I!==null&&I.type===q&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case F:e:{for(var ue=I.key,fe=D;fe!==null;){if(fe.key===ue){if(ue=I.type,ue===q){if(fe.tag===7){a(M,fe.sibling),D=h(fe,I.props.children),D.return=M,M=D;break e}}else if(fe.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===_e&&hm(ue)===fe.type){a(M,fe.sibling),D=h(fe,I.props),D.ref=no(M,fe,I),D.return=M,M=D;break e}a(M,fe);break}else i(M,fe);fe=fe.sibling}I.type===q?(D=ns(I.props.children,M.mode,G,I.key),D.return=M,M=D):(G=ll(I.type,I.key,I.props,null,M.mode,G),G.ref=no(M,D,I),G.return=M,M=G)}return x(M);case U:e:{for(fe=I.key;D!==null;){if(D.key===fe)if(D.tag===4&&D.stateNode.containerInfo===I.containerInfo&&D.stateNode.implementation===I.implementation){a(M,D.sibling),D=h(D,I.children||[]),D.return=M,M=D;break e}else{a(M,D);break}else i(M,D);D=D.sibling}D=Zc(I,M.mode,G),D.return=M,M=D}return x(M);case _e:return fe=I._init,Je(M,D,fe(I._payload),G)}if(nr(I))return ie(M,D,I,G);if(se(I))return le(M,D,I,G);Fa(M,I)}return typeof I=="string"&&I!==""||typeof I=="number"?(I=""+I,D!==null&&D.tag===6?(a(M,D.sibling),D=h(D,I),D.return=M,M=D):(a(M,D),D=Jc(I,M.mode,G),D.return=M,M=D),x(M)):a(M,D)}return Je}var Qs=pm(!0),mm=pm(!1),za=dr(null),Va=null,Ks=null,lc=null;function uc(){lc=Ks=Va=null}function cc(r){var i=za.current;Ue(za),r._currentValue=i}function dc(r,i,a){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===a)break;r=r.return}}function Gs(r,i){Va=r,lc=Ks=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(jt=!0),r.firstContext=null)}function en(r){var i=r._currentValue;if(lc!==r)if(r={context:r,memoizedValue:i,next:null},Ks===null){if(Va===null)throw Error(n(308));Ks=r,Va.dependencies={lanes:0,firstContext:r}}else Ks=Ks.next=r;return i}var Gr=null;function fc(r){Gr===null?Gr=[r]:Gr.push(r)}function gm(r,i,a,c){var h=i.interleaved;return h===null?(a.next=a,fc(i)):(a.next=h.next,h.next=a),i.interleaved=a,$n(r,c)}function $n(r,i){r.lanes|=i;var a=r.alternate;for(a!==null&&(a.lanes|=i),a=r,r=r.return;r!==null;)r.childLanes|=i,a=r.alternate,a!==null&&(a.childLanes|=i),a=r,r=r.return;return a.tag===3?a.stateNode:null}var pr=!1;function hc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ym(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Wn(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function mr(r,i,a){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(De&2)!==0){var h=c.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),c.pending=i,$n(r,a)}return h=c.interleaved,h===null?(i.next=i,fc(c)):(i.next=h.next,h.next=i),c.interleaved=i,$n(r,a)}function Ua(r,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194240)!==0)){var c=i.lanes;c&=r.pendingLanes,a|=c,i.lanes=a,ku(r,a)}}function vm(r,i){var a=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var x={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};m===null?h=m=x:m=m.next=x,a=a.next}while(a!==null);m===null?h=m=i:m=m.next=i}else h=m=i;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:c.shared,effects:c.effects},r.updateQueue=a;return}r=a.lastBaseUpdate,r===null?a.firstBaseUpdate=i:r.next=i,a.lastBaseUpdate=i}function Ba(r,i,a,c){var h=r.updateQueue;pr=!1;var m=h.firstBaseUpdate,x=h.lastBaseUpdate,T=h.shared.pending;if(T!==null){h.shared.pending=null;var A=T,V=A.next;A.next=null,x===null?m=V:x.next=V,x=A;var H=r.alternate;H!==null&&(H=H.updateQueue,T=H.lastBaseUpdate,T!==x&&(T===null?H.firstBaseUpdate=V:T.next=V,H.lastBaseUpdate=A))}if(m!==null){var Q=h.baseState;x=0,H=V=A=null,T=m;do{var W=T.lane,ee=T.eventTime;if((c&W)===W){H!==null&&(H=H.next={eventTime:ee,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});e:{var ie=r,le=T;switch(W=i,ee=a,le.tag){case 1:if(ie=le.payload,typeof ie=="function"){Q=ie.call(ee,Q,W);break e}Q=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=le.payload,W=typeof ie=="function"?ie.call(ee,Q,W):ie,W==null)break e;Q=B({},Q,W);break e;case 2:pr=!0}}T.callback!==null&&T.lane!==0&&(r.flags|=64,W=h.effects,W===null?h.effects=[T]:W.push(T))}else ee={eventTime:ee,lane:W,tag:T.tag,payload:T.payload,callback:T.callback,next:null},H===null?(V=H=ee,A=Q):H=H.next=ee,x|=W;if(T=T.next,T===null){if(T=h.shared.pending,T===null)break;W=T,T=W.next,W.next=null,h.lastBaseUpdate=W,h.shared.pending=null}}while(!0);if(H===null&&(A=Q),h.baseState=A,h.firstBaseUpdate=V,h.lastBaseUpdate=H,i=h.shared.interleaved,i!==null){h=i;do x|=h.lane,h=h.next;while(h!==i)}else m===null&&(h.shared.lanes=0);Jr|=x,r.lanes=x,r.memoizedState=Q}}function xm(r,i,a){if(r=i.effects,i.effects=null,r!==null)for(i=0;ia?a:4,r(!0);var c=vc.transition;vc.transition={};try{r(!1),i()}finally{Ie=a,vc.transition=c}}function Fm(){return tn().memoizedState}function qb(r,i,a){var c=xr(r);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},zm(r))Vm(i,a);else if(a=gm(r,i,a,c),a!==null){var h=At();xn(a,r,c,h),Um(a,i,c)}}function Qb(r,i,a){var c=xr(r),h={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(zm(r))Vm(i,h);else{var m=r.alternate;if(r.lanes===0&&(m===null||m.lanes===0)&&(m=i.lastRenderedReducer,m!==null))try{var x=i.lastRenderedState,T=m(x,a);if(h.hasEagerState=!0,h.eagerState=T,pn(T,x)){var A=i.interleaved;A===null?(h.next=h,fc(i)):(h.next=A.next,A.next=h),i.interleaved=h;return}}catch{}finally{}a=gm(r,i,h,c),a!==null&&(h=At(),xn(a,r,c,h),Um(a,i,c))}}function zm(r){var i=r.alternate;return r===He||i!==null&&i===He}function Vm(r,i){oo=Ha=!0;var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}function Um(r,i,a){if((a&4194240)!==0){var c=i.lanes;c&=r.pendingLanes,a|=c,i.lanes=a,ku(r,a)}}var Ka={readContext:en,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useInsertionEffect:St,useLayoutEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useMutableSource:St,useSyncExternalStore:St,useId:St,unstable_isNewReconciler:!1},Kb={readContext:en,useCallback:function(r,i){return Pn().memoizedState=[r,i===void 0?null:i],r},useContext:en,useEffect:Am,useImperativeHandle:function(r,i,a){return a=a!=null?a.concat([r]):null,qa(4194308,4,Dm.bind(null,i,r),a)},useLayoutEffect:function(r,i){return qa(4194308,4,r,i)},useInsertionEffect:function(r,i){return qa(4,2,r,i)},useMemo:function(r,i){var a=Pn();return i=i===void 0?null:i,r=r(),a.memoizedState=[r,i],r},useReducer:function(r,i,a){var c=Pn();return i=a!==void 0?a(i):i,c.memoizedState=c.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},c.queue=r,r=r.dispatch=qb.bind(null,He,r),[c.memoizedState,r]},useRef:function(r){var i=Pn();return r={current:r},i.memoizedState=r},useState:Pm,useDebugValue:Cc,useDeferredValue:function(r){return Pn().memoizedState=r},useTransition:function(){var r=Pm(!1),i=r[0];return r=Hb.bind(null,r[1]),Pn().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,a){var c=He,h=Pn();if($e){if(a===void 0)throw Error(n(407));a=a()}else{if(a=i(),ut===null)throw Error(n(349));(Yr&30)!==0||Em(c,i,a)}h.memoizedState=a;var m={value:a,getSnapshot:i};return h.queue=m,Am(Cm.bind(null,c,m,r),[r]),c.flags|=2048,uo(9,_m.bind(null,c,m,a,i),void 0,null),a},useId:function(){var r=Pn(),i=ut.identifierPrefix;if($e){var a=Bn,c=Un;a=(c&~(1<<32-hn(c)-1)).toString(32)+a,i=":"+i+"R"+a,a=ao++,0<\/script>",r=r.removeChild(r.firstChild)):typeof c.is=="string"?r=x.createElement(a,{is:c.is}):(r=x.createElement(a),a==="select"&&(x=r,c.multiple?x.multiple=!0:c.size&&(x.size=c.size))):r=x.createElementNS(r,a),r[Tn]=i,r[eo]=c,ag(r,i,!1,!1),i.stateNode=r;e:{switch(x=yu(a,c),a){case"dialog":Ve("cancel",r),Ve("close",r),h=c;break;case"iframe":case"object":case"embed":Ve("load",r),h=c;break;case"video":case"audio":for(h=0;hei&&(i.flags|=128,c=!0,co(m,!1),i.lanes=4194304)}else{if(!c)if(r=$a(x),r!==null){if(i.flags|=128,c=!0,a=r.updateQueue,a!==null&&(i.updateQueue=a,i.flags|=4),co(m,!0),m.tail===null&&m.tailMode==="hidden"&&!x.alternate&&!$e)return bt(i),null}else 2*Ye()-m.renderingStartTime>ei&&a!==1073741824&&(i.flags|=128,c=!0,co(m,!1),i.lanes=4194304);m.isBackwards?(x.sibling=i.child,i.child=x):(a=m.last,a!==null?a.sibling=x:i.child=x,m.last=x)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=Ye(),i.sibling=null,a=We.current,ze(We,c?a&1|2:a&1),i):(bt(i),null);case 22:case 23:return Gc(),c=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==c&&(i.flags|=8192),c&&(i.mode&1)!==0?(Ht&1073741824)!==0&&(bt(i),i.subtreeFlags&6&&(i.flags|=8192)):bt(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function nE(r,i){switch(sc(i),i.tag){case 1:return Dt(i.type)&&Oa(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Xs(),Ue(Ot),Ue(wt),yc(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return mc(i),null;case 13:if(Ue(We),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));qs()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Ue(We),null;case 4:return Xs(),null;case 10:return cc(i.type._context),null;case 22:case 23:return Gc(),null;case 24:return null;default:return null}}var Ja=!1,Et=!1,rE=typeof WeakSet=="function"?WeakSet:Set,re=null;function Js(r,i){var a=r.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Qe(r,i,c)}else a.current=null}function Ic(r,i,a){try{a()}catch(c){Qe(r,i,c)}}var cg=!1;function sE(r,i){if(Gu=va,r=Bp(),Uu(r)){if("selectionStart"in r)var a={start:r.selectionStart,end:r.selectionEnd};else e:{a=(a=r.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var x=0,T=-1,A=-1,V=0,H=0,Q=r,W=null;t:for(;;){for(var ee;Q!==a||h!==0&&Q.nodeType!==3||(T=x+h),Q!==m||c!==0&&Q.nodeType!==3||(A=x+c),Q.nodeType===3&&(x+=Q.nodeValue.length),(ee=Q.firstChild)!==null;)W=Q,Q=ee;for(;;){if(Q===r)break t;if(W===a&&++V===h&&(T=x),W===m&&++H===c&&(A=x),(ee=Q.nextSibling)!==null)break;Q=W,W=Q.parentNode}Q=ee}a=T===-1||A===-1?null:{start:T,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xu={focusedElem:r,selectionRange:a},va=!1,re=i;re!==null;)if(i=re,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,re=r;else for(;re!==null;){i=re;try{var ie=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var le=ie.memoizedProps,Je=ie.memoizedState,M=i.stateNode,D=M.getSnapshotBeforeUpdate(i.elementType===i.type?le:gn(i.type,le),Je);M.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var I=i.stateNode.containerInfo;I.nodeType===1?I.textContent="":I.nodeType===9&&I.documentElement&&I.removeChild(I.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(G){Qe(i,i.return,G)}if(r=i.sibling,r!==null){r.return=i.return,re=r;break}re=i.return}return ie=cg,cg=!1,ie}function fo(r,i,a){var c=i.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&r)===r){var m=h.destroy;h.destroy=void 0,m!==void 0&&Ic(i,a,m)}h=h.next}while(h!==c)}}function Za(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&r)===r){var c=a.create;a.destroy=c()}a=a.next}while(a!==i)}}function Fc(r){var i=r.ref;if(i!==null){var a=r.stateNode;switch(r.tag){case 5:r=a;break;default:r=a}typeof i=="function"?i(r):i.current=r}}function dg(r){var i=r.alternate;i!==null&&(r.alternate=null,dg(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[Tn],delete i[eo],delete i[ec],delete i[Vb],delete i[Ub])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function fg(r){return r.tag===5||r.tag===3||r.tag===4}function hg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||fg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function zc(r,i,a){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?a.nodeType===8?a.parentNode.insertBefore(r,i):a.insertBefore(r,i):(a.nodeType===8?(i=a.parentNode,i.insertBefore(r,a)):(i=a,i.appendChild(r)),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Aa));else if(c!==4&&(r=r.child,r!==null))for(zc(r,i,a),r=r.sibling;r!==null;)zc(r,i,a),r=r.sibling}function Vc(r,i,a){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?a.insertBefore(r,i):a.appendChild(r);else if(c!==4&&(r=r.child,r!==null))for(Vc(r,i,a),r=r.sibling;r!==null;)Vc(r,i,a),r=r.sibling}var pt=null,yn=!1;function gr(r,i,a){for(a=a.child;a!==null;)pg(r,i,a),a=a.sibling}function pg(r,i,a){if(Cn&&typeof Cn.onCommitFiberUnmount=="function")try{Cn.onCommitFiberUnmount(fa,a)}catch{}switch(a.tag){case 5:Et||Js(a,i);case 6:var c=pt,h=yn;pt=null,gr(r,i,a),pt=c,yn=h,pt!==null&&(yn?(r=pt,a=a.stateNode,r.nodeType===8?r.parentNode.removeChild(a):r.removeChild(a)):pt.removeChild(a.stateNode));break;case 18:pt!==null&&(yn?(r=pt,a=a.stateNode,r.nodeType===8?Zu(r.parentNode,a):r.nodeType===1&&Zu(r,a),$i(r)):Zu(pt,a.stateNode));break;case 4:c=pt,h=yn,pt=a.stateNode.containerInfo,yn=!0,gr(r,i,a),pt=c,yn=h;break;case 0:case 11:case 14:case 15:if(!Et&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var m=h,x=m.destroy;m=m.tag,x!==void 0&&((m&2)!==0||(m&4)!==0)&&Ic(a,i,x),h=h.next}while(h!==c)}gr(r,i,a);break;case 1:if(!Et&&(Js(a,i),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(T){Qe(a,i,T)}gr(r,i,a);break;case 21:gr(r,i,a);break;case 22:a.mode&1?(Et=(c=Et)||a.memoizedState!==null,gr(r,i,a),Et=c):gr(r,i,a);break;default:gr(r,i,a)}}function mg(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var a=r.stateNode;a===null&&(a=r.stateNode=new rE),i.forEach(function(c){var h=hE.bind(null,r,c);a.has(c)||(a.add(c),c.then(h,h))})}}function vn(r,i){var a=i.deletions;if(a!==null)for(var c=0;ch&&(h=x),c&=~m}if(c=h,c=Ye()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*oE(c/1960))-c,10r?16:r,vr===null)var c=!1;else{if(r=vr,vr=null,sl=0,(De&6)!==0)throw Error(n(331));var h=De;for(De|=4,re=r.current;re!==null;){var m=re,x=m.child;if((re.flags&16)!==0){var T=m.deletions;if(T!==null){for(var A=0;AYe()-$c?es(r,0):Bc|=a),Mt(r,i)}function Pg(r,i){i===0&&((r.mode&1)===0?i=1:(i=pa,pa<<=1,(pa&130023424)===0&&(pa=4194304)));var a=At();r=$n(r,i),r!==null&&(Fi(r,i,a),Mt(r,a))}function fE(r){var i=r.memoizedState,a=0;i!==null&&(a=i.retryLane),Pg(r,a)}function hE(r,i){var a=0;switch(r.tag){case 13:var c=r.stateNode,h=r.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=r.stateNode;break;default:throw Error(n(314))}c!==null&&c.delete(i),Pg(r,a)}var Rg;Rg=function(r,i,a){if(r!==null)if(r.memoizedProps!==i.pendingProps||Ot.current)jt=!0;else{if((r.lanes&a)===0&&(i.flags&128)===0)return jt=!1,eE(r,i,a);jt=(r.flags&131072)!==0}else jt=!1,$e&&(i.flags&1048576)!==0&&lm(i,Ma,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;Ya(r,i),r=i.pendingProps;var h=$s(i,wt.current);Gs(i,a),h=wc(null,i,c,r,h,a);var m=Sc();return i.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Dt(c)?(m=!0,Da(i)):m=!1,i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,hc(i),h.updater=Ga,i.stateNode=h,h._reactInternals=i,kc(i,c,r,a),i=Nc(null,i,c,!0,m,a)):(i.tag=0,$e&&m&&rc(i),Rt(null,i,h,a),i=i.child),i;case 16:c=i.elementType;e:{switch(Ya(r,i),r=i.pendingProps,h=c._init,c=h(c._payload),i.type=c,h=i.tag=mE(c),r=gn(c,r),h){case 0:i=Ac(null,i,c,r,a);break e;case 1:i=tg(null,i,c,r,a);break e;case 11:i=Xm(null,i,c,r,a);break e;case 14:i=Ym(null,i,c,gn(c.type,r),a);break e}throw Error(n(306,c,""))}return i;case 0:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:gn(c,h),Ac(r,i,c,h,a);case 1:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:gn(c,h),tg(r,i,c,h,a);case 3:e:{if(ng(i),r===null)throw Error(n(387));c=i.pendingProps,m=i.memoizedState,h=m.element,ym(r,i),Ba(i,c,null,a);var x=i.memoizedState;if(c=x.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},i.updateQueue.baseState=m,i.memoizedState=m,i.flags&256){h=Ys(Error(n(423)),i),i=rg(r,i,c,a,h);break e}else if(c!==h){h=Ys(Error(n(424)),i),i=rg(r,i,c,a,h);break e}else for(Wt=cr(i.stateNode.containerInfo.firstChild),$t=i,$e=!0,mn=null,a=mm(i,null,c,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(qs(),c===h){i=Hn(r,i,a);break e}Rt(r,i,c,a)}i=i.child}return i;case 5:return wm(i),r===null&&oc(i),c=i.type,h=i.pendingProps,m=r!==null?r.memoizedProps:null,x=h.children,Yu(c,h)?x=null:m!==null&&Yu(c,m)&&(i.flags|=32),eg(r,i),Rt(r,i,x,a),i.child;case 6:return r===null&&oc(i),null;case 13:return sg(r,i,a);case 4:return pc(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=Qs(i,null,c,a):Rt(r,i,c,a),i.child;case 11:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:gn(c,h),Xm(r,i,c,h,a);case 7:return Rt(r,i,i.pendingProps,a),i.child;case 8:return Rt(r,i,i.pendingProps.children,a),i.child;case 12:return Rt(r,i,i.pendingProps.children,a),i.child;case 10:e:{if(c=i.type._context,h=i.pendingProps,m=i.memoizedProps,x=h.value,ze(za,c._currentValue),c._currentValue=x,m!==null)if(pn(m.value,x)){if(m.children===h.children&&!Ot.current){i=Hn(r,i,a);break e}}else for(m=i.child,m!==null&&(m.return=i);m!==null;){var T=m.dependencies;if(T!==null){x=m.child;for(var A=T.firstContext;A!==null;){if(A.context===c){if(m.tag===1){A=Wn(-1,a&-a),A.tag=2;var V=m.updateQueue;if(V!==null){V=V.shared;var H=V.pending;H===null?A.next=A:(A.next=H.next,H.next=A),V.pending=A}}m.lanes|=a,A=m.alternate,A!==null&&(A.lanes|=a),dc(m.return,a,i),T.lanes|=a;break}A=A.next}}else if(m.tag===10)x=m.type===i.type?null:m.child;else if(m.tag===18){if(x=m.return,x===null)throw Error(n(341));x.lanes|=a,T=x.alternate,T!==null&&(T.lanes|=a),dc(x,a,i),x=m.sibling}else x=m.child;if(x!==null)x.return=m;else for(x=m;x!==null;){if(x===i){x=null;break}if(m=x.sibling,m!==null){m.return=x.return,x=m;break}x=x.return}m=x}Rt(r,i,h.children,a),i=i.child}return i;case 9:return h=i.type,c=i.pendingProps.children,Gs(i,a),h=en(h),c=c(h),i.flags|=1,Rt(r,i,c,a),i.child;case 14:return c=i.type,h=gn(c,i.pendingProps),h=gn(c.type,h),Ym(r,i,c,h,a);case 15:return Jm(r,i,i.type,i.pendingProps,a);case 17:return c=i.type,h=i.pendingProps,h=i.elementType===c?h:gn(c,h),Ya(r,i),i.tag=1,Dt(c)?(r=!0,Da(i)):r=!1,Gs(i,a),$m(i,c,h),kc(i,c,h,a),Nc(null,i,c,!0,r,a);case 19:return og(r,i,a);case 22:return Zm(r,i,a)}throw Error(n(156,i.tag))};function Ag(r,i){return up(r,i)}function pE(r,i,a,c){this.tag=r,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rn(r,i,a,c){return new pE(r,i,a,c)}function Yc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function mE(r){if(typeof r=="function")return Yc(r)?1:0;if(r!=null){if(r=r.$$typeof,r===Te)return 11;if(r===Ce)return 14}return 2}function Sr(r,i){var a=r.alternate;return a===null?(a=rn(r.tag,i,r.key,r.mode),a.elementType=r.elementType,a.type=r.type,a.stateNode=r.stateNode,a.alternate=r,r.alternate=a):(a.pendingProps=i,a.type=r.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=r.flags&14680064,a.childLanes=r.childLanes,a.lanes=r.lanes,a.child=r.child,a.memoizedProps=r.memoizedProps,a.memoizedState=r.memoizedState,a.updateQueue=r.updateQueue,i=r.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=r.sibling,a.index=r.index,a.ref=r.ref,a}function ll(r,i,a,c,h,m){var x=2;if(c=r,typeof r=="function")Yc(r)&&(x=1);else if(typeof r=="string")x=5;else e:switch(r){case q:return ns(a.children,h,m,i);case z:x=8,h|=8;break;case Y:return r=rn(12,a,i,h|2),r.elementType=Y,r.lanes=m,r;case Se:return r=rn(13,a,i,h),r.elementType=Se,r.lanes=m,r;case Z:return r=rn(19,a,i,h),r.elementType=Z,r.lanes=m,r;case ce:return ul(a,h,m,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ne:x=10;break e;case ve:x=9;break e;case Te:x=11;break e;case Ce:x=14;break e;case _e:x=16,c=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=rn(x,a,i,h),i.elementType=r,i.type=c,i.lanes=m,i}function ns(r,i,a,c){return r=rn(7,r,c,i),r.lanes=a,r}function ul(r,i,a,c){return r=rn(22,r,c,i),r.elementType=ce,r.lanes=a,r.stateNode={isHidden:!1},r}function Jc(r,i,a){return r=rn(6,r,null,i),r.lanes=a,r}function Zc(r,i,a){return i=rn(4,r.children!==null?r.children:[],r.key,i),i.lanes=a,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function gE(r,i,a,c,h){this.tag=i,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Tu(0),this.expirationTimes=Tu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tu(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function ed(r,i,a,c,h,m,x,T,A){return r=new gE(r,i,a,T,A),i===1?(i=1,m===!0&&(i|=8)):i=0,m=rn(3,null,null,i),r.current=m,m.stateNode=r,m.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},hc(m),r}function yE(r,i,a){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),ad.exports=NE(),ad.exports}var Hg;function OE(){if(Hg)return yl;Hg=1;var t=V0();return yl.createRoot=t.createRoot,yl.hydrateRoot=t.hydrateRoot,yl}var DE=OE();const jE=Ff(DE),LE=20,ME=1e6,Jn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let cd=0;function IE(){return cd=(cd+1)%Number.MAX_VALUE,cd.toString()}const dd=new Map,qg=t=>{if(dd.has(t))return;const e=setTimeout(()=>{dd.delete(t),No({type:Jn.REMOVE_TOAST,toastId:t})},ME);dd.set(t,e)},FE=(t,e)=>{switch(e.type){case Jn.ADD_TOAST:return{...t,toasts:[e.toast,...t.toasts].slice(0,LE)};case Jn.UPDATE_TOAST:return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case Jn.DISMISS_TOAST:{const{toastId:n}=e;return n?qg(n):t.toasts.forEach(s=>{qg(s.id)}),{...t,toasts:t.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case Jn.REMOVE_TOAST:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Al=[];let Nl={toasts:[]};function No(t){Nl=FE(Nl,t),Al.forEach(e=>{e(Nl)})}function zE({...t}){const e=IE(),n=o=>No({type:Jn.UPDATE_TOAST,toast:{...o,id:e}}),s=()=>No({type:Jn.DISMISS_TOAST,toastId:e});return No({type:Jn.ADD_TOAST,toast:{...t,id:e,open:!0,onOpenChange:o=>{o||s()}}}),{id:e,dismiss:s,update:n}}function VE(){const[t,e]=C.useState(Nl);return C.useEffect(()=>(Al.push(e),()=>{const n=Al.indexOf(e);n>-1&&Al.splice(n,1)}),[t]),{...t,toast:zE,dismiss:n=>No({type:Jn.DISMISS_TOAST,toastId:n})}}var Vf=V0();const UE=Ff(Vf);function qt(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t==null||t(o),n===!1||!o.defaultPrevented)return e==null?void 0:e(o)}}function Qg(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Uf(...t){return e=>{let n=!1;const s=t.map(o=>{const l=Qg(o,e);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o{var b;const{scope:w,children:_,...P}=y,E=((b=w==null?void 0:w[t])==null?void 0:b[f])||d,S=C.useMemo(()=>P,Object.values(P));return v.jsx(E.Provider,{value:S,children:_})};p.displayName=l+"Provider";function g(y,w){var E;const _=((E=w==null?void 0:w[t])==null?void 0:E[f])||d,P=C.useContext(_);if(P)return P;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${l}\``)}return[p,g]}const o=()=>{const l=n.map(u=>C.createContext(u));return function(d){const f=(d==null?void 0:d[t])||l;return C.useMemo(()=>({[`__scope${t}`]:{...d,[t]:f}}),[d,f])}};return o.scopeName=t,[s,BE(o,...e)]}function BE(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const s=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const u=s.reduce((d,{useScope:f,scopeName:p})=>{const y=f(l)[`__scope${p}`];return{...d,...y}},{});return C.useMemo(()=>({[`__scope${e.scopeName}`]:u}),[u])}};return n.scopeName=e.scopeName,n}function Kg(t){const e=$E(t),n=C.forwardRef((s,o)=>{const{children:l,...u}=s,d=C.Children.toArray(l),f=d.find(HE);if(f){const p=f.props.children,g=d.map(y=>y===f?C.Children.count(p)>1?C.Children.only(null):C.isValidElement(p)?p.props.children:null:y);return v.jsx(e,{...u,ref:o,children:C.isValidElement(p)?C.cloneElement(p,void 0,g):null})}return v.jsx(e,{...u,ref:o,children:l})});return n.displayName=`${t}.Slot`,n}function $E(t){const e=C.forwardRef((n,s)=>{const{children:o,...l}=n;if(C.isValidElement(o)){const u=QE(o),d=qE(l,o.props);return o.type!==C.Fragment&&(d.ref=s?Uf(s,u):u),C.cloneElement(o,d)}return C.Children.count(o)>1?C.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var WE=Symbol("radix.slottable");function HE(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===WE}function qE(t,e){const n={...e};for(const s in e){const o=t[s],l=e[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...t,...n}}function QE(t){var s,o;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function KE(t){const e=t+"CollectionProvider",[n,s]=U0(e),[o,l]=n(e,{collectionRef:{current:null},itemMap:new Map}),u=E=>{const{scope:S,children:b}=E,R=Cr.useRef(null),k=Cr.useRef(new Map).current;return v.jsx(o,{scope:S,itemMap:k,collectionRef:R,children:b})};u.displayName=e;const d=t+"CollectionSlot",f=Kg(d),p=Cr.forwardRef((E,S)=>{const{scope:b,children:R}=E,k=l(d,b),N=Cs(S,k.collectionRef);return v.jsx(f,{ref:N,children:R})});p.displayName=d;const g=t+"CollectionItemSlot",y="data-radix-collection-item",w=Kg(g),_=Cr.forwardRef((E,S)=>{const{scope:b,children:R,...k}=E,N=Cr.useRef(null),F=Cs(S,N),U=l(g,b);return Cr.useEffect(()=>(U.itemMap.set(N,{ref:N,...k}),()=>void U.itemMap.delete(N))),v.jsx(w,{[y]:"",ref:F,children:R})});_.displayName=g;function P(E){const S=l(t+"CollectionConsumer",E);return Cr.useCallback(()=>{const R=S.collectionRef.current;if(!R)return[];const k=Array.from(R.querySelectorAll(`[${y}]`));return Array.from(S.itemMap.values()).sort((U,q)=>k.indexOf(U.ref.current)-k.indexOf(q.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:u,Slot:p,ItemSlot:_},P,s]}function GE(t){const e=XE(t),n=C.forwardRef((s,o)=>{const{children:l,...u}=s,d=C.Children.toArray(l),f=d.find(JE);if(f){const p=f.props.children,g=d.map(y=>y===f?C.Children.count(p)>1?C.Children.only(null):C.isValidElement(p)?p.props.children:null:y);return v.jsx(e,{...u,ref:o,children:C.isValidElement(p)?C.cloneElement(p,void 0,g):null})}return v.jsx(e,{...u,ref:o,children:l})});return n.displayName=`${t}.Slot`,n}function XE(t){const e=C.forwardRef((n,s)=>{const{children:o,...l}=n;if(C.isValidElement(o)){const u=e_(o),d=ZE(l,o.props);return o.type!==C.Fragment&&(d.ref=s?Uf(s,u):u),C.cloneElement(o,d)}return C.Children.count(o)>1?C.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var YE=Symbol("radix.slottable");function JE(t){return C.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===YE}function ZE(t,e){const n={...e};for(const s in e){const o=t[s],l=e[s];/^on[A-Z]/.test(s)?o&&l?n[s]=(...d)=>{const f=l(...d);return o(...d),f}:o&&(n[s]=o):s==="style"?n[s]={...o,...l}:s==="className"&&(n[s]=[o,l].filter(Boolean).join(" "))}return{...t,...n}}function e_(t){var s,o;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var t_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],In=t_.reduce((t,e)=>{const n=GE(`Primitive.${e}`),s=C.forwardRef((o,l)=>{const{asChild:u,...d}=o,f=u?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(f,{...d,ref:l})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{});function B0(t,e){t&&Vf.flushSync(()=>t.dispatchEvent(e))}function Ts(t){const e=C.useRef(t);return C.useEffect(()=>{e.current=t}),C.useMemo(()=>(...n)=>{var s;return(s=e.current)==null?void 0:s.call(e,...n)},[])}function n_(t,e=globalThis==null?void 0:globalThis.document){const n=Ts(t);C.useEffect(()=>{const s=o=>{o.key==="Escape"&&n(o)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[n,e])}var r_="DismissableLayer",Ud="dismissableLayer.update",s_="dismissableLayer.pointerDownOutside",i_="dismissableLayer.focusOutside",Gg,$0=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),W0=C.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=t,p=C.useContext($0),[g,y]=C.useState(null),w=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,_]=C.useState({}),P=Cs(e,q=>y(q)),E=Array.from(p.layers),[S]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),b=E.indexOf(S),R=g?E.indexOf(g):-1,k=p.layersWithOutsidePointerEventsDisabled.size>0,N=R>=b,F=a_(q=>{const z=q.target,Y=[...p.branches].some(ne=>ne.contains(z));!N||Y||(o==null||o(q),u==null||u(q),q.defaultPrevented||d==null||d())},w),U=l_(q=>{const z=q.target;[...p.branches].some(ne=>ne.contains(z))||(l==null||l(q),u==null||u(q),q.defaultPrevented||d==null||d())},w);return n_(q=>{R===p.layers.size-1&&(s==null||s(q),!q.defaultPrevented&&d&&(q.preventDefault(),d()))},w),C.useEffect(()=>{if(g)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Gg=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(g)),p.layers.add(g),Xg(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(w.body.style.pointerEvents=Gg)}},[g,w,n,p]),C.useEffect(()=>()=>{g&&(p.layers.delete(g),p.layersWithOutsidePointerEventsDisabled.delete(g),Xg())},[g,p]),C.useEffect(()=>{const q=()=>_({});return document.addEventListener(Ud,q),()=>document.removeEventListener(Ud,q)},[]),v.jsx(In.div,{...f,ref:P,style:{pointerEvents:k?N?"auto":"none":void 0,...t.style},onFocusCapture:qt(t.onFocusCapture,U.onFocusCapture),onBlurCapture:qt(t.onBlurCapture,U.onBlurCapture),onPointerDownCapture:qt(t.onPointerDownCapture,F.onPointerDownCapture)})});W0.displayName=r_;var o_="DismissableLayerBranch",H0=C.forwardRef((t,e)=>{const n=C.useContext($0),s=C.useRef(null),o=Cs(e,s);return C.useEffect(()=>{const l=s.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),v.jsx(In.div,{...t,ref:o})});H0.displayName=o_;function a_(t,e=globalThis==null?void 0:globalThis.document){const n=Ts(t),s=C.useRef(!1),o=C.useRef(()=>{});return C.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let f=function(){q0(s_,n,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=f,e.addEventListener("click",o.current,{once:!0})):f()}else e.removeEventListener("click",o.current);s.current=!1},u=window.setTimeout(()=>{e.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),e.removeEventListener("pointerdown",l),e.removeEventListener("click",o.current)}},[e,n]),{onPointerDownCapture:()=>s.current=!0}}function l_(t,e=globalThis==null?void 0:globalThis.document){const n=Ts(t),s=C.useRef(!1);return C.useEffect(()=>{const o=l=>{l.target&&!s.current&&q0(i_,n,{originalEvent:l},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Xg(){const t=new CustomEvent(Ud);document.dispatchEvent(t)}function q0(t,e,n,{discrete:s}){const o=n.originalEvent.target,l=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),s?B0(o,l):o.dispatchEvent(l)}var u_=W0,c_=H0,Io=globalThis!=null&&globalThis.document?C.useLayoutEffect:()=>{},d_="Portal",Q0=C.forwardRef((t,e)=>{var d;const{container:n,...s}=t,[o,l]=C.useState(!1);Io(()=>l(!0),[]);const u=n||o&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return u?UE.createPortal(v.jsx(In.div,{...s,ref:e}),u):null});Q0.displayName=d_;function f_(t,e){return C.useReducer((n,s)=>e[n][s]??n,t)}var K0=t=>{const{present:e,children:n}=t,s=h_(e),o=typeof n=="function"?n({present:s.isPresent}):C.Children.only(n),l=Cs(s.ref,p_(o));return typeof n=="function"||s.isPresent?C.cloneElement(o,{ref:l}):null};K0.displayName="Presence";function h_(t){const[e,n]=C.useState(),s=C.useRef(null),o=C.useRef(t),l=C.useRef("none"),u=t?"mounted":"unmounted",[d,f]=f_(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const p=vl(s.current);l.current=d==="mounted"?p:"none"},[d]),Io(()=>{const p=s.current,g=o.current;if(g!==t){const w=l.current,_=vl(p);t?f("MOUNT"):_==="none"||(p==null?void 0:p.display)==="none"?f("UNMOUNT"):f(g&&w!==_?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,f]),Io(()=>{if(e){let p;const g=e.ownerDocument.defaultView??window,y=_=>{const E=vl(s.current).includes(CSS.escape(_.animationName));if(_.target===e&&E&&(f("ANIMATION_END"),!o.current)){const S=e.style.animationFillMode;e.style.animationFillMode="forwards",p=g.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=S)})}},w=_=>{_.target===e&&(l.current=vl(s.current))};return e.addEventListener("animationstart",w),e.addEventListener("animationcancel",y),e.addEventListener("animationend",y),()=>{g.clearTimeout(p),e.removeEventListener("animationstart",w),e.removeEventListener("animationcancel",y),e.removeEventListener("animationend",y)}}else f("ANIMATION_END")},[e,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:C.useCallback(p=>{s.current=p?getComputedStyle(p):null,n(p)},[])}}function vl(t){return(t==null?void 0:t.animationName)||"none"}function p_(t){var s,o;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var m_=z0[" useInsertionEffect ".trim().toString()]||Io;function g_({prop:t,defaultProp:e,onChange:n=()=>{},caller:s}){const[o,l,u]=y_({defaultProp:e,onChange:n}),d=t!==void 0,f=d?t:o;{const g=C.useRef(t!==void 0);C.useEffect(()=>{const y=g.current;y!==d&&console.warn(`${s} is changing from ${y?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=d},[d,s])}const p=C.useCallback(g=>{var y;if(d){const w=v_(g)?g(t):g;w!==t&&((y=u.current)==null||y.call(u,w))}else l(g)},[d,t,l,u]);return[f,p]}function y_({defaultProp:t,onChange:e}){const[n,s]=C.useState(t),o=C.useRef(n),l=C.useRef(e);return m_(()=>{l.current=e},[e]),C.useEffect(()=>{var u;o.current!==n&&((u=l.current)==null||u.call(l,n),o.current=n)},[n,o]),[n,s,l]}function v_(t){return typeof t=="function"}var x_=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),w_="VisuallyHidden",Bf=C.forwardRef((t,e)=>v.jsx(In.span,{...t,ref:e,style:{...x_,...t.style}}));Bf.displayName=w_;var $f="ToastProvider",[Wf,S_,b_]=KE("Toast"),[G0]=U0("Toast",[b_]),[E_,nu]=G0($f),X0=t=>{const{__scopeToast:e,label:n="Notification",duration:s=5e3,swipeDirection:o="right",swipeThreshold:l=50,children:u}=t,[d,f]=C.useState(null),[p,g]=C.useState(0),y=C.useRef(!1),w=C.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${$f}\`. Expected non-empty \`string\`.`),v.jsx(Wf.Provider,{scope:e,children:v.jsx(E_,{scope:e,label:n,duration:s,swipeDirection:o,swipeThreshold:l,toastCount:p,viewport:d,onViewportChange:f,onToastAdd:C.useCallback(()=>g(_=>_+1),[]),onToastRemove:C.useCallback(()=>g(_=>_-1),[]),isFocusedToastEscapeKeyDownRef:y,isClosePausedRef:w,children:u})})};X0.displayName=$f;var Y0="ToastViewport",__=["F8"],Bd="toast.viewportPause",$d="toast.viewportResume",J0=C.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:s=__,label:o="Notifications ({hotkey})",...l}=t,u=nu(Y0,n),d=S_(n),f=C.useRef(null),p=C.useRef(null),g=C.useRef(null),y=C.useRef(null),w=Cs(e,y,u.onViewportChange),_=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=u.toastCount>0;C.useEffect(()=>{const S=b=>{var k;s.length!==0&&s.every(N=>b[N]||b.code===N)&&((k=y.current)==null||k.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[s]),C.useEffect(()=>{const S=f.current,b=y.current;if(P&&S&&b){const R=()=>{if(!u.isClosePausedRef.current){const U=new CustomEvent(Bd);b.dispatchEvent(U),u.isClosePausedRef.current=!0}},k=()=>{if(u.isClosePausedRef.current){const U=new CustomEvent($d);b.dispatchEvent(U),u.isClosePausedRef.current=!1}},N=U=>{!S.contains(U.relatedTarget)&&k()},F=()=>{S.contains(document.activeElement)||k()};return S.addEventListener("focusin",R),S.addEventListener("focusout",N),S.addEventListener("pointermove",R),S.addEventListener("pointerleave",F),window.addEventListener("blur",R),window.addEventListener("focus",k),()=>{S.removeEventListener("focusin",R),S.removeEventListener("focusout",N),S.removeEventListener("pointermove",R),S.removeEventListener("pointerleave",F),window.removeEventListener("blur",R),window.removeEventListener("focus",k)}}},[P,u.isClosePausedRef]);const E=C.useCallback(({tabbingDirection:S})=>{const R=d().map(k=>{const N=k.ref.current,F=[N,...I_(N)];return S==="forwards"?F:F.reverse()});return(S==="forwards"?R.reverse():R).flat()},[d]);return C.useEffect(()=>{const S=y.current;if(S){const b=R=>{var F,U,q;const k=R.altKey||R.ctrlKey||R.metaKey;if(R.key==="Tab"&&!k){const z=document.activeElement,Y=R.shiftKey;if(R.target===S&&Y){(F=p.current)==null||F.focus();return}const Te=E({tabbingDirection:Y?"backwards":"forwards"}),Se=Te.findIndex(Z=>Z===z);fd(Te.slice(Se+1))?R.preventDefault():Y?(U=p.current)==null||U.focus():(q=g.current)==null||q.focus()}};return S.addEventListener("keydown",b),()=>S.removeEventListener("keydown",b)}},[d,E]),v.jsxs(c_,{ref:f,role:"region","aria-label":o.replace("{hotkey}",_),tabIndex:-1,style:{pointerEvents:P?void 0:"none"},children:[P&&v.jsx(Wd,{ref:p,onFocusFromOutsideViewport:()=>{const S=E({tabbingDirection:"forwards"});fd(S)}}),v.jsx(Wf.Slot,{scope:n,children:v.jsx(In.ol,{tabIndex:-1,...l,ref:w})}),P&&v.jsx(Wd,{ref:g,onFocusFromOutsideViewport:()=>{const S=E({tabbingDirection:"backwards"});fd(S)}})]})});J0.displayName=Y0;var Z0="ToastFocusProxy",Wd=C.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:s,...o}=t,l=nu(Z0,n);return v.jsx(Bf,{tabIndex:0,...o,ref:e,style:{position:"fixed"},onFocus:u=>{var p;const d=u.relatedTarget;!((p=l.viewport)!=null&&p.contains(d))&&s()}})});Wd.displayName=Z0;var Yo="Toast",C_="toast.swipeStart",T_="toast.swipeMove",k_="toast.swipeCancel",P_="toast.swipeEnd",ex=C.forwardRef((t,e)=>{const{forceMount:n,open:s,defaultOpen:o,onOpenChange:l,...u}=t,[d,f]=g_({prop:s,defaultProp:o??!0,onChange:l,caller:Yo});return v.jsx(K0,{present:n||d,children:v.jsx(N_,{open:d,...u,ref:e,onClose:()=>f(!1),onPause:Ts(t.onPause),onResume:Ts(t.onResume),onSwipeStart:qt(t.onSwipeStart,p=>{p.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:qt(t.onSwipeMove,p=>{const{x:g,y}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","move"),p.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${y}px`)}),onSwipeCancel:qt(t.onSwipeCancel,p=>{p.currentTarget.setAttribute("data-swipe","cancel"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:qt(t.onSwipeEnd,p=>{const{x:g,y}=p.detail.delta;p.currentTarget.setAttribute("data-swipe","end"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),p.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),p.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),p.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${y}px`),f(!1)})})})});ex.displayName=Yo;var[R_,A_]=G0(Yo,{onClose(){}}),N_=C.forwardRef((t,e)=>{const{__scopeToast:n,type:s="foreground",duration:o,open:l,onClose:u,onEscapeKeyDown:d,onPause:f,onResume:p,onSwipeStart:g,onSwipeMove:y,onSwipeCancel:w,onSwipeEnd:_,...P}=t,E=nu(Yo,n),[S,b]=C.useState(null),R=Cs(e,Z=>b(Z)),k=C.useRef(null),N=C.useRef(null),F=o||E.duration,U=C.useRef(0),q=C.useRef(F),z=C.useRef(0),{onToastAdd:Y,onToastRemove:ne}=E,ve=Ts(()=>{var Ce;(S==null?void 0:S.contains(document.activeElement))&&((Ce=E.viewport)==null||Ce.focus()),u()}),Te=C.useCallback(Z=>{!Z||Z===1/0||(window.clearTimeout(z.current),U.current=new Date().getTime(),z.current=window.setTimeout(ve,Z))},[ve]);C.useEffect(()=>{const Z=E.viewport;if(Z){const Ce=()=>{Te(q.current),p==null||p()},_e=()=>{const ce=new Date().getTime()-U.current;q.current=q.current-ce,window.clearTimeout(z.current),f==null||f()};return Z.addEventListener(Bd,_e),Z.addEventListener($d,Ce),()=>{Z.removeEventListener(Bd,_e),Z.removeEventListener($d,Ce)}}},[E.viewport,F,f,p,Te]),C.useEffect(()=>{l&&!E.isClosePausedRef.current&&Te(F)},[l,F,E.isClosePausedRef,Te]),C.useEffect(()=>(Y(),()=>ne()),[Y,ne]);const Se=C.useMemo(()=>S?ax(S):null,[S]);return E.viewport?v.jsxs(v.Fragment,{children:[Se&&v.jsx(O_,{__scopeToast:n,role:"status","aria-live":s==="foreground"?"assertive":"polite",children:Se}),v.jsx(R_,{scope:n,onClose:ve,children:Vf.createPortal(v.jsx(Wf.ItemSlot,{scope:n,children:v.jsx(u_,{asChild:!0,onEscapeKeyDown:qt(d,()=>{E.isFocusedToastEscapeKeyDownRef.current||ve(),E.isFocusedToastEscapeKeyDownRef.current=!1}),children:v.jsx(In.li,{tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":E.swipeDirection,...P,ref:R,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:qt(t.onKeyDown,Z=>{Z.key==="Escape"&&(d==null||d(Z.nativeEvent),Z.nativeEvent.defaultPrevented||(E.isFocusedToastEscapeKeyDownRef.current=!0,ve()))}),onPointerDown:qt(t.onPointerDown,Z=>{Z.button===0&&(k.current={x:Z.clientX,y:Z.clientY})}),onPointerMove:qt(t.onPointerMove,Z=>{if(!k.current)return;const Ce=Z.clientX-k.current.x,_e=Z.clientY-k.current.y,ce=!!N.current,K=["left","right"].includes(E.swipeDirection),se=["left","up"].includes(E.swipeDirection)?Math.min:Math.max,B=K?se(0,Ce):0,j=K?0:se(0,_e),$=Z.pointerType==="touch"?10:2,de={x:B,y:j},ge={originalEvent:Z,delta:de};ce?(N.current=de,xl(T_,y,ge,{discrete:!1})):Yg(de,E.swipeDirection,$)?(N.current=de,xl(C_,g,ge,{discrete:!1}),Z.target.setPointerCapture(Z.pointerId)):(Math.abs(Ce)>$||Math.abs(_e)>$)&&(k.current=null)}),onPointerUp:qt(t.onPointerUp,Z=>{const Ce=N.current,_e=Z.target;if(_e.hasPointerCapture(Z.pointerId)&&_e.releasePointerCapture(Z.pointerId),N.current=null,k.current=null,Ce){const ce=Z.currentTarget,K={originalEvent:Z,delta:Ce};Yg(Ce,E.swipeDirection,E.swipeThreshold)?xl(P_,_,K,{discrete:!0}):xl(k_,w,K,{discrete:!0}),ce.addEventListener("click",se=>se.preventDefault(),{once:!0})}})})})}),E.viewport)})]}):null}),O_=t=>{const{__scopeToast:e,children:n,...s}=t,o=nu(Yo,e),[l,u]=C.useState(!1),[d,f]=C.useState(!1);return L_(()=>u(!0)),C.useEffect(()=>{const p=window.setTimeout(()=>f(!0),1e3);return()=>window.clearTimeout(p)},[]),d?null:v.jsx(Q0,{asChild:!0,children:v.jsx(Bf,{...s,children:l&&v.jsxs(v.Fragment,{children:[o.label," ",n]})})})},D_="ToastTitle",tx=C.forwardRef((t,e)=>{const{__scopeToast:n,...s}=t;return v.jsx(In.div,{...s,ref:e})});tx.displayName=D_;var j_="ToastDescription",nx=C.forwardRef((t,e)=>{const{__scopeToast:n,...s}=t;return v.jsx(In.div,{...s,ref:e})});nx.displayName=j_;var rx="ToastAction",sx=C.forwardRef((t,e)=>{const{altText:n,...s}=t;return n.trim()?v.jsx(ox,{altText:n,asChild:!0,children:v.jsx(Hf,{...s,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${rx}\`. Expected non-empty \`string\`.`),null)});sx.displayName=rx;var ix="ToastClose",Hf=C.forwardRef((t,e)=>{const{__scopeToast:n,...s}=t,o=A_(ix,n);return v.jsx(ox,{asChild:!0,children:v.jsx(In.button,{type:"button",...s,ref:e,onClick:qt(t.onClick,o.onClose)})})});Hf.displayName=ix;var ox=C.forwardRef((t,e)=>{const{__scopeToast:n,altText:s,...o}=t;return v.jsx(In.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":s||void 0,...o,ref:e})});function ax(t){const e=[];return Array.from(t.childNodes).forEach(s=>{if(s.nodeType===s.TEXT_NODE&&s.textContent&&e.push(s.textContent),M_(s)){const o=s.ariaHidden||s.hidden||s.style.display==="none",l=s.dataset.radixToastAnnounceExclude==="";if(!o)if(l){const u=s.dataset.radixToastAnnounceAlt;u&&e.push(u)}else e.push(...ax(s))}}),e}function xl(t,e,n,{discrete:s}){const o=n.originalEvent.currentTarget,l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),s?B0(o,l):o.dispatchEvent(l)}var Yg=(t,e,n=0)=>{const s=Math.abs(t.x),o=Math.abs(t.y),l=s>o;return e==="left"||e==="right"?l&&s>n:!l&&o>n};function L_(t=()=>{}){const e=Ts(t);Io(()=>{let n=0,s=0;return n=window.requestAnimationFrame(()=>s=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(s)}},[e])}function M_(t){return t.nodeType===t.ELEMENT_NODE}function I_(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const o=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||o?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function fd(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var F_=X0,lx=J0,ux=ex,cx=tx,dx=nx,fx=sx,hx=Hf;function px(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;etypeof t=="boolean"?`${t}`:t===0?"0":t,Zg=mx,z_=(t,e)=>n=>{var s;if((e==null?void 0:e.variants)==null)return Zg(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=e,u=Object.keys(o).map(p=>{const g=n==null?void 0:n[p],y=l==null?void 0:l[p];if(g===null)return null;const w=Jg(g)||Jg(y);return o[p][w]}),d=n&&Object.entries(n).reduce((p,g)=>{let[y,w]=g;return w===void 0||(p[y]=w),p},{}),f=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((p,g)=>{let{class:y,className:w,..._}=g;return Object.entries(_).every(P=>{let[E,S]=P;return Array.isArray(S)?S.includes({...l,...d}[E]):{...l,...d}[E]===S})?[...p,y,w]:p},[]);return Zg(t,u,f,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const V_=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gx=(...t)=>t.filter((e,n,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===n).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var U_={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const B_=C.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:o="",children:l,iconNode:u,...d},f)=>C.createElement("svg",{ref:f,...U_,width:e,height:e,stroke:t,strokeWidth:s?Number(n)*24/Number(e):n,className:gx("lucide",o),...d},[...u.map(([p,g])=>C.createElement(p,g)),...Array.isArray(l)?l:[l]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Xe=(t,e)=>{const n=C.forwardRef(({className:s,...o},l)=>C.createElement(B_,{ref:l,iconNode:e,className:gx(`lucide-${V_(t)}`,s),...o}));return n.displayName=`${t}`,n};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $_=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],W_=Xe("BadgeCheck",$_);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const H_=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],q_=Xe("Building2",H_);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Q_=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],K_=Xe("ChartLine",Q_);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const G_=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],X_=Xe("ChevronDown",G_);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Y_=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],J_=Xe("ChevronRight",Y_);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Z_=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],eC=Xe("Compass",Z_);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const tC=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]],nC=Xe("FileCheck",tC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const rC=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],sC=Xe("Flag",rC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const iC=[["path",{d:"M10 10V5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5",key:"1p9q5i"}],["path",{d:"M14 6a6 6 0 0 1 6 6v3",key:"1hnv84"}],["path",{d:"M4 15v-3a6 6 0 0 1 6-6",key:"9ciidu"}],["rect",{x:"2",y:"15",width:"20",height:"4",rx:"1",key:"g3x8cw"}]],oC=Xe("HardHat",iC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const aC=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],lC=Xe("KeyRound",aC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const uC=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],cC=Xe("Leaf",uC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const dC=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],fC=Xe("Linkedin",dC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hC=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],pC=Xe("Menu",hC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mC=[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]],gC=Xe("PenTool",mC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yC=[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],vC=Xe("SearchCheck",yC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xC=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],wC=Xe("Search",xC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const SC=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],yx=Xe("ShieldCheck",SC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],EC=Xe("Target",bC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _C=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],CC=Xe("Twitter",_C);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const TC=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],kC=Xe("Users",TC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const PC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],vx=Xe("X",PC);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const RC=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],AC=Xe("Youtube",RC),NC=(t,e)=>{const n=new Array(t.length+e.length);for(let s=0;s({classGroupId:t,validator:e}),xx=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Bl="-",ey=[],DC="arbitrary..",jC=t=>{const e=MC(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return LC(u);const d=u.split(Bl),f=d[0]===""&&d.length>1?1:0;return wx(d,f,e)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=s[u],p=n[u];return f?p?NC(p,f):f:p||ey}return n[u]||ey}}},wx=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],l=n.nextPart.get(o);if(l){const p=wx(t,e+1,l);if(p)return p}const u=n.validators;if(u===null)return;const d=e===0?t.join(Bl):t.slice(e).join(Bl),f=u.length;for(let p=0;pt.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),s=e.slice(0,n);return s?DC+s:void 0})(),MC=t=>{const{theme:e,classGroups:n}=t;return IC(n,e)},IC=(t,e)=>{const n=xx();for(const s in t){const o=t[s];qf(o,n,s,e)}return n},qf=(t,e,n,s)=>{const o=t.length;for(let l=0;l{if(typeof t=="string"){zC(t,e,n);return}if(typeof t=="function"){VC(t,e,n,s);return}UC(t,e,n,s)},zC=(t,e,n)=>{const s=t===""?e:Sx(e,t);s.classGroupId=n},VC=(t,e,n,s)=>{if(BC(t)){qf(t(s),e,n,s);return}e.validators===null&&(e.validators=[]),e.validators.push(OC(n,t))},UC=(t,e,n,s)=>{const o=Object.entries(t),l=o.length;for(let u=0;u{let n=t;const s=e.split(Bl),o=s.length;for(let l=0;l"isThemeGetter"in t&&t.isThemeGetter===!0,$C=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),s=Object.create(null);const o=(l,u)=>{n[l]=u,e++,e>t&&(e=0,s=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=s[l])!==void 0)return o(l,u),u},set(l,u){l in n?n[l]=u:o(l,u)}}},Hd="!",ty=":",WC=[],ny=(t,e,n,s,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:s,isExternal:o}),HC=t=>{const{prefix:e,experimentalParseClassName:n}=t;let s=o=>{const l=[];let u=0,d=0,f=0,p;const g=o.length;for(let E=0;Ef?p-f:void 0;return ny(l,_,w,P)};if(e){const o=e+ty,l=s;s=u=>u.startsWith(o)?l(u.slice(o.length)):ny(WC,!1,u,void 0,!0)}if(n){const o=s;s=l=>n({className:l,parseClassName:o})}return s},qC=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,s)=>{e.set(n,1e6+s)}),n=>{const s=[];let o=[];for(let l=0;l0&&(o.sort(),s.push(...o),o=[]),s.push(u)):o.push(u)}return o.length>0&&(o.sort(),s.push(...o)),s}},QC=t=>({cache:$C(t.cacheSize),parseClassName:HC(t),sortModifiers:qC(t),...jC(t)}),KC=/\s+/,GC=(t,e)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:o,sortModifiers:l}=e,u=[],d=t.trim().split(KC);let f="";for(let p=d.length-1;p>=0;p-=1){const g=d[p],{isExternal:y,modifiers:w,hasImportantModifier:_,baseClassName:P,maybePostfixModifierPosition:E}=n(g);if(y){f=g+(f.length>0?" "+f:f);continue}let S=!!E,b=s(S?P.substring(0,E):P);if(!b){if(!S){f=g+(f.length>0?" "+f:f);continue}if(b=s(P),!b){f=g+(f.length>0?" "+f:f);continue}S=!1}const R=w.length===0?"":w.length===1?w[0]:l(w).join(":"),k=_?R+Hd:R,N=k+b;if(u.indexOf(N)>-1)continue;u.push(N);const F=o(b,S);for(let U=0;U0?" "+f:f)}return f},XC=(...t)=>{let e=0,n,s,o="";for(;e{if(typeof t=="string")return t;let e,n="";for(let s=0;s{let n,s,o,l;const u=f=>{const p=e.reduce((g,y)=>y(g),t());return n=QC(p),s=n.cache.get,o=n.cache.set,l=d,d(f)},d=f=>{const p=s(f);if(p)return p;const g=GC(f,n);return o(f,g),g};return l=u,(...f)=>l(XC(...f))},JC=[],ot=t=>{const e=n=>n[t]||JC;return e.isThemeGetter=!0,e},Ex=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_x=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ZC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,eT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,nT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Er=t=>ZC.test(t),ke=t=>!!t&&!Number.isNaN(Number(t)),_r=t=>!!t&&Number.isInteger(Number(t)),hd=t=>t.endsWith("%")&&ke(t.slice(0,-1)),Qn=t=>eT.test(t),Cx=()=>!0,iT=t=>tT.test(t)&&!nT.test(t),Qf=()=>!1,oT=t=>rT.test(t),aT=t=>sT.test(t),lT=t=>!oe(t)&&!ae(t),uT=t=>Ur(t,Px,Qf),oe=t=>Ex.test(t),rs=t=>Ur(t,Rx,iT),ry=t=>Ur(t,yT,ke),cT=t=>Ur(t,Nx,Cx),dT=t=>Ur(t,Ax,Qf),sy=t=>Ur(t,Tx,Qf),fT=t=>Ur(t,kx,aT),wl=t=>Ur(t,Ox,oT),ae=t=>_x.test(t),vo=t=>As(t,Rx),hT=t=>As(t,Ax),iy=t=>As(t,Tx),pT=t=>As(t,Px),mT=t=>As(t,kx),Sl=t=>As(t,Ox,!0),gT=t=>As(t,Nx,!0),Ur=(t,e,n)=>{const s=Ex.exec(t);return s?s[1]?e(s[1]):n(s[2]):!1},As=(t,e,n=!1)=>{const s=_x.exec(t);return s?s[1]?e(s[1]):n:!1},Tx=t=>t==="position"||t==="percentage",kx=t=>t==="image"||t==="url",Px=t=>t==="length"||t==="size"||t==="bg-size",Rx=t=>t==="length",yT=t=>t==="number",Ax=t=>t==="family-name",Nx=t=>t==="number"||t==="weight",Ox=t=>t==="shadow",vT=()=>{const t=ot("color"),e=ot("font"),n=ot("text"),s=ot("font-weight"),o=ot("tracking"),l=ot("leading"),u=ot("breakpoint"),d=ot("container"),f=ot("spacing"),p=ot("radius"),g=ot("shadow"),y=ot("inset-shadow"),w=ot("text-shadow"),_=ot("drop-shadow"),P=ot("blur"),E=ot("perspective"),S=ot("aspect"),b=ot("ease"),R=ot("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...N(),ae,oe],U=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],z=()=>[ae,oe,f],Y=()=>[Er,"full","auto",...z()],ne=()=>[_r,"none","subgrid",ae,oe],ve=()=>["auto",{span:["full",_r,ae,oe]},_r,ae,oe],Te=()=>[_r,"auto",ae,oe],Se=()=>["auto","min","max","fr",ae,oe],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ce=()=>["start","end","center","stretch","center-safe","end-safe"],_e=()=>["auto",...z()],ce=()=>[Er,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],K=()=>[Er,"screen","full","dvw","lvw","svw","min","max","fit",...z()],se=()=>[Er,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],B=()=>[t,ae,oe],j=()=>[...N(),iy,sy,{position:[ae,oe]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],de=()=>["auto","cover","contain",pT,uT,{size:[ae,oe]}],ge=()=>[hd,vo,rs],pe=()=>["","none","full",p,ae,oe],X=()=>["",ke,vo,rs],be=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>[ke,hd,iy,sy],at=()=>["","none",P,ae,oe],Gt=()=>["none",ke,ae,oe],ft=()=>["none",ke,ae,oe],cn=()=>[ke,ae,oe],Xt=()=>[Er,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qn],breakpoint:[Qn],color:[Cx],container:[Qn],"drop-shadow":[Qn],ease:["in","out","in-out"],font:[lT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qn],shadow:[Qn],spacing:["px",ke],text:[Qn],"text-shadow":[Qn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Er,oe,ae,S]}],container:["container"],columns:[{columns:[ke,oe,ae,d]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:U()}],"overflow-x":[{"overflow-x":U()}],"overflow-y":[{"overflow-y":U()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[_r,"auto",ae,oe]}],basis:[{basis:[Er,"full","auto",d,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,Er,"auto","initial","none",oe]}],grow:[{grow:["",ke,ae,oe]}],shrink:[{shrink:["",ke,ae,oe]}],order:[{order:[_r,"first","last","none",ae,oe]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:ve()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:ve()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Se()}],"auto-rows":[{"auto-rows":Se()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...Ce(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ce()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...Ce(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ce(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...Ce(),"baseline"]}],"place-self":[{"place-self":["auto",...Ce()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:_e()}],mx:[{mx:_e()}],my:[{my:_e()}],ms:[{ms:_e()}],me:[{me:_e()}],mbs:[{mbs:_e()}],mbe:[{mbe:_e()}],mt:[{mt:_e()}],mr:[{mr:_e()}],mb:[{mb:_e()}],ml:[{ml:_e()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:ce()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...se()]}],"min-block-size":[{"min-block":["auto",...se()]}],"max-block-size":[{"max-block":["none",...se()]}],w:[{w:[d,"screen",...ce()]}],"min-w":[{"min-w":[d,"screen","none",...ce()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...ce()]}],h:[{h:["screen","lh",...ce()]}],"min-h":[{"min-h":["screen","lh","none",...ce()]}],"max-h":[{"max-h":["screen","lh",...ce()]}],"font-size":[{text:["base",n,vo,rs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,gT,cT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hd,oe]}],"font-family":[{font:[hT,dT,e]}],"font-features":[{"font-features":[oe]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ae,oe]}],"line-clamp":[{"line-clamp":[ke,"none",ae,ry]}],leading:[{leading:[l,...z()]}],"list-image":[{"list-image":["none",ae,oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",ae,rs]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[ke,"auto",ae,oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:de()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_r,ae,oe],radial:["",ae,oe],conic:[_r,ae,oe]},mT,fT]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-bs":[{"border-bs":B()}],"border-color-be":[{"border-be":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,ae,oe]}],"outline-w":[{outline:["",ke,vo,rs]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",g,Sl,wl]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",y,Sl,wl]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[ke,rs]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",w,Sl,wl]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[ke,ae,oe]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":we()}],"mask-image-linear-to-pos":[{"mask-linear-to":we()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":we()}],"mask-image-t-to-pos":[{"mask-t-to":we()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":we()}],"mask-image-r-to-pos":[{"mask-r-to":we()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":we()}],"mask-image-b-to-pos":[{"mask-b-to":we()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":we()}],"mask-image-l-to-pos":[{"mask-l-to":we()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":we()}],"mask-image-x-to-pos":[{"mask-x-to":we()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":we()}],"mask-image-y-to-pos":[{"mask-y-to":we()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[ae,oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":we()}],"mask-image-radial-to-pos":[{"mask-radial-to":we()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":we()}],"mask-image-conic-to-pos":[{"mask-conic-to":we()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:de()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,oe]}],filter:[{filter:["","none",ae,oe]}],blur:[{blur:at()}],brightness:[{brightness:[ke,ae,oe]}],contrast:[{contrast:[ke,ae,oe]}],"drop-shadow":[{"drop-shadow":["","none",_,Sl,wl]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",ke,ae,oe]}],"hue-rotate":[{"hue-rotate":[ke,ae,oe]}],invert:[{invert:["",ke,ae,oe]}],saturate:[{saturate:[ke,ae,oe]}],sepia:[{sepia:["",ke,ae,oe]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,oe]}],"backdrop-blur":[{"backdrop-blur":at()}],"backdrop-brightness":[{"backdrop-brightness":[ke,ae,oe]}],"backdrop-contrast":[{"backdrop-contrast":[ke,ae,oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,ae,oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,ae,oe]}],"backdrop-invert":[{"backdrop-invert":["",ke,ae,oe]}],"backdrop-opacity":[{"backdrop-opacity":[ke,ae,oe]}],"backdrop-saturate":[{"backdrop-saturate":[ke,ae,oe]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,ae,oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",ae,oe]}],ease:[{ease:["linear","initial",b,ae,oe]}],delay:[{delay:[ke,ae,oe]}],animate:[{animate:["none",R,ae,oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,ae,oe]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:Gt()}],"rotate-x":[{"rotate-x":Gt()}],"rotate-y":[{"rotate-y":Gt()}],"rotate-z":[{"rotate-z":Gt()}],scale:[{scale:ft()}],"scale-x":[{"scale-x":ft()}],"scale-y":[{"scale-y":ft()}],"scale-z":[{"scale-z":ft()}],"scale-3d":["scale-3d"],skew:[{skew:cn()}],"skew-x":[{"skew-x":cn()}],"skew-y":[{"skew-y":cn()}],transform:[{transform:[ae,oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Xt()}],"translate-x":[{"translate-x":Xt()}],"translate-y":[{"translate-y":Xt()}],"translate-z":[{"translate-z":Xt()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,oe]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[ke,vo,rs,ry]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},xT=YC(vT);function Br(...t){return xT(mx(t))}const wT=F_,Dx=C.forwardRef(({className:t,...e},n)=>v.jsx(lx,{ref:n,className:Br("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));Dx.displayName=lx.displayName;const ST=z_("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),jx=C.forwardRef(({className:t,variant:e,...n},s)=>v.jsx(ux,{ref:s,className:Br(ST({variant:e}),t),...n}));jx.displayName=ux.displayName;const bT=C.forwardRef(({className:t,...e},n)=>v.jsx(fx,{ref:n,className:Br("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));bT.displayName=fx.displayName;const Lx=C.forwardRef(({className:t,...e},n)=>v.jsx(hx,{ref:n,className:Br("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:v.jsx(vx,{className:"h-4 w-4"})}));Lx.displayName=hx.displayName;const Mx=C.forwardRef(({className:t,...e},n)=>v.jsx(cx,{ref:n,className:Br("text-sm font-semibold",t),...e}));Mx.displayName=cx.displayName;const Ix=C.forwardRef(({className:t,...e},n)=>v.jsx(dx,{ref:n,className:Br("text-sm opacity-90",t),...e}));Ix.displayName=dx.displayName;function ET(){const{toasts:t}=VE();return v.jsxs(wT,{children:[t.map(function({id:e,title:n,description:s,action:o,...l}){return v.jsxs(jx,{...l,children:[v.jsxs("div",{className:"grid gap-1",children:[n&&v.jsx(Mx,{children:n}),s&&v.jsx(Ix,{children:s})]}),o,v.jsx(Lx,{})]},e)}),v.jsx(Dx,{})]})}var Jo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_T={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Pr,If,P0,CT=(P0=class{constructor(){me(this,Pr,_T);me(this,If,!1)}setTimeoutProvider(t){te(this,Pr,t)}setTimeout(t,e){return O(this,Pr).setTimeout(t,e)}clearTimeout(t){O(this,Pr).clearTimeout(t)}setInterval(t,e){return O(this,Pr).setInterval(t,e)}clearInterval(t){O(this,Pr).clearInterval(t)}},Pr=new WeakMap,If=new WeakMap,P0),cs=new CT;function TT(t){setTimeout(t,0)}var ks=typeof window>"u"||"Deno"in globalThis;function zt(){}function kT(t,e){return typeof t=="function"?t(e):t}function qd(t){return typeof t=="number"&&t>=0&&t!==1/0}function Fx(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ir(t,e){return typeof t=="function"?t(e):t}function ln(t,e){return typeof t=="function"?t(e):t}function oy(t,e){const{type:n="all",exact:s,fetchStatus:o,predicate:l,queryKey:u,stale:d}=t;if(u){if(s){if(e.queryHash!==Kf(u,e.options))return!1}else if(!zo(e.queryKey,u))return!1}if(n!=="all"){const f=e.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&e.isStale()!==d||o&&o!==e.state.fetchStatus||l&&!l(e))}function ay(t,e){const{exact:n,status:s,predicate:o,mutationKey:l}=t;if(l){if(!e.options.mutationKey)return!1;if(n){if(Fo(e.options.mutationKey)!==Fo(l))return!1}else if(!zo(e.options.mutationKey,l))return!1}return!(s&&e.state.status!==s||o&&!o(e))}function Kf(t,e){return((e==null?void 0:e.queryKeyHashFn)||Fo)(t)}function Fo(t){return JSON.stringify(t,(e,n)=>Kd(n)?Object.keys(n).sort().reduce((s,o)=>(s[o]=n[o],s),{}):n)}function zo(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>zo(t[n],e[n])):!1}var PT=Object.prototype.hasOwnProperty;function zx(t,e,n=0){if(t===e)return t;if(n>500)return e;const s=ly(t)&&ly(e);if(!s&&!(Kd(t)&&Kd(e)))return e;const l=(s?t:Object.keys(t)).length,u=s?e:Object.keys(e),d=u.length,f=s?new Array(d):{};let p=0;for(let g=0;g{cs.setTimeout(e,t)})}function Gd(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?zx(t,e):e}function AT(t,e,n=0){const s=[...t,e];return n&&s.length>n?s.slice(1):s}function NT(t,e,n=0){const s=[e,...t];return n&&s.length>n?s.slice(0,-1):s}var Gf=Symbol();function Vx(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Gf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Ux(t,e){return typeof t=="function"?t(...e):!!t}function OT(t,e,n){let s=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??(o=e()),s||(s=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),t}var hs,Rr,ci,R0,DT=(R0=class extends Jo{constructor(){super();me(this,hs);me(this,Rr);me(this,ci);te(this,ci,e=>{if(!ks&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){O(this,Rr)||this.setEventListener(O(this,ci))}onUnsubscribe(){var e;this.hasListeners()||((e=O(this,Rr))==null||e.call(this),te(this,Rr,void 0))}setEventListener(e){var n;te(this,ci,e),(n=O(this,Rr))==null||n.call(this),te(this,Rr,e(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(e){O(this,hs)!==e&&(te(this,hs,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof O(this,hs)=="boolean"?O(this,hs):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},hs=new WeakMap,Rr=new WeakMap,ci=new WeakMap,R0),Xf=new DT;function Xd(){let t,e;const n=new Promise((o,l)=>{t=o,e=l});n.status="pending",n.catch(()=>{});function s(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{s({status:"fulfilled",value:o}),t(o)},n.reject=o=>{s({status:"rejected",reason:o}),e(o)},n}var jT=TT;function LT(){let t=[],e=0,n=d=>{d()},s=d=>{d()},o=jT;const l=d=>{e?t.push(d):o(()=>{n(d)})},u=()=>{const d=t;t=[],d.length&&o(()=>{s(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;e++;try{f=d()}finally{e--,e||u()}return f},batchCalls:d=>(...f)=>{l(()=>{d(...f)})},schedule:l,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{o=d}}}var vt=LT(),di,Ar,fi,A0,MT=(A0=class extends Jo{constructor(){super();me(this,di,!0);me(this,Ar);me(this,fi);te(this,fi,e=>{if(!ks&&window.addEventListener){const n=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){O(this,Ar)||this.setEventListener(O(this,fi))}onUnsubscribe(){var e;this.hasListeners()||((e=O(this,Ar))==null||e.call(this),te(this,Ar,void 0))}setEventListener(e){var n;te(this,fi,e),(n=O(this,Ar))==null||n.call(this),te(this,Ar,e(this.setOnline.bind(this)))}setOnline(e){O(this,di)!==e&&(te(this,di,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return O(this,di)}},di=new WeakMap,Ar=new WeakMap,fi=new WeakMap,A0),$l=new MT;function IT(t){return Math.min(1e3*2**t,3e4)}function Bx(t){return(t??"online")==="online"?$l.isOnline():!0}var Yd=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function $x(t){let e=!1,n=0,s;const o=Xd(),l=()=>o.status!=="pending",u=E=>{var S;if(!l()){const b=new Yd(E);w(b),(S=t.onCancel)==null||S.call(t,b)}},d=()=>{e=!0},f=()=>{e=!1},p=()=>Xf.isFocused()&&(t.networkMode==="always"||$l.isOnline())&&t.canRun(),g=()=>Bx(t.networkMode)&&t.canRun(),y=E=>{l()||(s==null||s(),o.resolve(E))},w=E=>{l()||(s==null||s(),o.reject(E))},_=()=>new Promise(E=>{var S;s=b=>{(l()||p())&&E(b)},(S=t.onPause)==null||S.call(t)}).then(()=>{var E;s=void 0,l()||(E=t.onContinue)==null||E.call(t)}),P=()=>{if(l())return;let E;const S=n===0?t.initialPromise:void 0;try{E=S??t.fn()}catch(b){E=Promise.reject(b)}Promise.resolve(E).then(y).catch(b=>{var U;if(l())return;const R=t.retry??(ks?0:3),k=t.retryDelay??IT,N=typeof k=="function"?k(n,b):k,F=R===!0||typeof R=="number"&&np()?void 0:_()).then(()=>{e?w(b):P()})})};return{promise:o,status:()=>o.status,cancel:u,continue:()=>(s==null||s(),o),cancelRetry:d,continueRetry:f,canStart:g,start:()=>(g()?P():_().then(P),o)}}var ps,N0,Wx=(N0=class{constructor(){me(this,ps)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qd(this.gcTime)&&te(this,ps,cs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ks?1/0:300*1e3))}clearGcTimeout(){O(this,ps)&&(cs.clearTimeout(O(this,ps)),te(this,ps,void 0))}},ps=new WeakMap,N0),ms,hi,an,gs,dt,qo,ys,Sn,Kn,O0,FT=(O0=class extends Wx{constructor(e){super();me(this,Sn);me(this,ms);me(this,hi);me(this,an);me(this,gs);me(this,dt);me(this,qo);me(this,ys);te(this,ys,!1),te(this,qo,e.defaultOptions),this.setOptions(e.options),this.observers=[],te(this,gs,e.client),te(this,an,O(this,gs).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,te(this,ms,dy(this.options)),this.state=e.state??O(this,ms),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=O(this,dt))==null?void 0:e.promise}setOptions(e){if(this.options={...O(this,qo),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=dy(this.options);n.data!==void 0&&(this.setState(cy(n.data,n.dataUpdatedAt)),te(this,ms,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,an).remove(this)}setData(e,n){const s=Gd(this.state.data,e,this.options);return Ae(this,Sn,Kn).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(e,n){Ae(this,Sn,Kn).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var s,o;const n=(s=O(this,dt))==null?void 0:s.promise;return(o=O(this,dt))==null||o.cancel(e),n?n.then(zt).catch(zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,ms))}isActive(){return this.observers.some(e=>ln(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Ir(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Fx(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(s=>s.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=O(this,dt))==null||n.continue()}onOnline(){var n;const e=this.observers.find(s=>s.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=O(this,dt))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),O(this,an).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(O(this,dt)&&(O(this,ys)?O(this,dt).cancel({revert:!0}):O(this,dt).cancelRetry()),this.scheduleGc()),O(this,an).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ae(this,Sn,Kn).call(this,{type:"invalidate"})}async fetch(e,n){var f,p,g,y,w,_,P,E,S,b,R,k;if(this.state.fetchStatus!=="idle"&&((f=O(this,dt))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(O(this,dt))return O(this,dt).continueRetry(),O(this,dt).promise}if(e&&this.setOptions(e),!this.options.queryFn){const N=this.observers.find(F=>F.options.queryFn);N&&this.setOptions(N.options)}const s=new AbortController,o=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(te(this,ys,!0),s.signal)})},l=()=>{const N=Vx(this.options,n),U=(()=>{const q={client:O(this,gs),queryKey:this.queryKey,meta:this.meta};return o(q),q})();return te(this,ys,!1),this.options.persister?this.options.persister(N,U,this):N(U)},d=(()=>{const N={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:O(this,gs),state:this.state,fetchFn:l};return o(N),N})();(p=this.options.behavior)==null||p.onFetch(d,this),te(this,hi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=d.fetchOptions)==null?void 0:g.meta))&&Ae(this,Sn,Kn).call(this,{type:"fetch",meta:(y=d.fetchOptions)==null?void 0:y.meta}),te(this,dt,$x({initialPromise:n==null?void 0:n.initialPromise,fn:d.fetchFn,onCancel:N=>{N instanceof Yd&&N.revert&&this.setState({...O(this,hi),fetchStatus:"idle"}),s.abort()},onFail:(N,F)=>{Ae(this,Sn,Kn).call(this,{type:"failed",failureCount:N,error:F})},onPause:()=>{Ae(this,Sn,Kn).call(this,{type:"pause"})},onContinue:()=>{Ae(this,Sn,Kn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const N=await O(this,dt).start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(_=(w=O(this,an).config).onSuccess)==null||_.call(w,N,this),(E=(P=O(this,an).config).onSettled)==null||E.call(P,N,this.state.error,this),N}catch(N){if(N instanceof Yd){if(N.silent)return O(this,dt).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Ae(this,Sn,Kn).call(this,{type:"error",error:N}),(b=(S=O(this,an).config).onError)==null||b.call(S,N,this),(k=(R=O(this,an).config).onSettled)==null||k.call(R,this.state.data,N,this),N}finally{this.scheduleGc()}}},ms=new WeakMap,hi=new WeakMap,an=new WeakMap,gs=new WeakMap,dt=new WeakMap,qo=new WeakMap,ys=new WeakMap,Sn=new WeakSet,Kn=function(e){const n=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Hx(s.data,this.options),fetchMeta:e.meta??null};case"success":const o={...s,...cy(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return te(this,hi,e.manual?o:void 0),o;case"error":const l=e.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=n(this.state),vt.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),O(this,an).notify({query:this,type:"updated",action:e})})},O0);function Hx(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Bx(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function cy(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function dy(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,s=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ft,Ne,Qo,Nt,vs,pi,Xn,Nr,Ko,mi,gi,xs,ws,Or,yi,Me,Eo,Jd,Zd,ef,tf,nf,rf,sf,qx,D0,zT=(D0=class extends Jo{constructor(e,n){super();me(this,Me);me(this,Ft);me(this,Ne);me(this,Qo);me(this,Nt);me(this,vs);me(this,pi);me(this,Xn);me(this,Nr);me(this,Ko);me(this,mi);me(this,gi);me(this,xs);me(this,ws);me(this,Or);me(this,yi,new Set);this.options=n,te(this,Ft,e),te(this,Nr,null),te(this,Xn,Xd()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,Ne).addObserver(this),fy(O(this,Ne),this.options)?Ae(this,Me,Eo).call(this):this.updateResult(),Ae(this,Me,tf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return of(O(this,Ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return of(O(this,Ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ae(this,Me,nf).call(this),Ae(this,Me,rf).call(this),O(this,Ne).removeObserver(this)}setOptions(e){const n=this.options,s=O(this,Ne);if(this.options=O(this,Ft).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ln(this.options.enabled,O(this,Ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ae(this,Me,sf).call(this),O(this,Ne).setOptions(this.options),n._defaulted&&!Qd(this.options,n)&&O(this,Ft).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,Ne),observer:this});const o=this.hasListeners();o&&hy(O(this,Ne),s,this.options,n)&&Ae(this,Me,Eo).call(this),this.updateResult(),o&&(O(this,Ne)!==s||ln(this.options.enabled,O(this,Ne))!==ln(n.enabled,O(this,Ne))||Ir(this.options.staleTime,O(this,Ne))!==Ir(n.staleTime,O(this,Ne)))&&Ae(this,Me,Jd).call(this);const l=Ae(this,Me,Zd).call(this);o&&(O(this,Ne)!==s||ln(this.options.enabled,O(this,Ne))!==ln(n.enabled,O(this,Ne))||l!==O(this,Or))&&Ae(this,Me,ef).call(this,l)}getOptimisticResult(e){const n=O(this,Ft).getQueryCache().build(O(this,Ft),e),s=this.createResult(n,e);return UT(this,s)&&(te(this,Nt,s),te(this,pi,this.options),te(this,vs,O(this,Ne).state)),s}getCurrentResult(){return O(this,Nt)}trackResult(e,n){return new Proxy(e,{get:(s,o)=>(this.trackProp(o),n==null||n(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&O(this,Xn).status==="pending"&&O(this,Xn).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,o))})}trackProp(e){O(this,yi).add(e)}getCurrentQuery(){return O(this,Ne)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=O(this,Ft).defaultQueryOptions(e),s=O(this,Ft).getQueryCache().build(O(this,Ft),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(e){return Ae(this,Me,Eo).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,Nt)))}createResult(e,n){var Y;const s=O(this,Ne),o=this.options,l=O(this,Nt),u=O(this,vs),d=O(this,pi),p=e!==s?e.state:O(this,Qo),{state:g}=e;let y={...g},w=!1,_;if(n._optimisticResults){const ne=this.hasListeners(),ve=!ne&&fy(e,n),Te=ne&&hy(e,s,n,o);(ve||Te)&&(y={...y,...Hx(g.data,e.options)}),n._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:P,errorUpdatedAt:E,status:S}=y;_=y.data;let b=!1;if(n.placeholderData!==void 0&&_===void 0&&S==="pending"){let ne;l!=null&&l.isPlaceholderData&&n.placeholderData===(d==null?void 0:d.placeholderData)?(ne=l.data,b=!0):ne=typeof n.placeholderData=="function"?n.placeholderData((Y=O(this,gi))==null?void 0:Y.state.data,O(this,gi)):n.placeholderData,ne!==void 0&&(S="success",_=Gd(l==null?void 0:l.data,ne,n),w=!0)}if(n.select&&_!==void 0&&!b)if(l&&_===(u==null?void 0:u.data)&&n.select===O(this,Ko))_=O(this,mi);else try{te(this,Ko,n.select),_=n.select(_),_=Gd(l==null?void 0:l.data,_,n),te(this,mi,_),te(this,Nr,null)}catch(ne){te(this,Nr,ne)}O(this,Nr)&&(P=O(this,Nr),_=O(this,mi),E=Date.now(),S="error");const R=y.fetchStatus==="fetching",k=S==="pending",N=S==="error",F=k&&R,U=_!==void 0,z={status:S,fetchStatus:y.fetchStatus,isPending:k,isSuccess:S==="success",isError:N,isInitialLoading:F,isLoading:F,data:_,dataUpdatedAt:y.dataUpdatedAt,error:P,errorUpdatedAt:E,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>p.dataUpdateCount||y.errorUpdateCount>p.errorUpdateCount,isFetching:R,isRefetching:R&&!k,isLoadingError:N&&!U,isPaused:y.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:N&&U,isStale:Yf(e,n),refetch:this.refetch,promise:O(this,Xn),isEnabled:ln(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const ne=z.data!==void 0,ve=z.status==="error"&&!ne,Te=Ce=>{ve?Ce.reject(z.error):ne&&Ce.resolve(z.data)},Se=()=>{const Ce=te(this,Xn,z.promise=Xd());Te(Ce)},Z=O(this,Xn);switch(Z.status){case"pending":e.queryHash===s.queryHash&&Te(Z);break;case"fulfilled":(ve||z.data!==Z.value)&&Se();break;case"rejected":(!ve||z.error!==Z.reason)&&Se();break}}return z}updateResult(){const e=O(this,Nt),n=this.createResult(O(this,Ne),this.options);if(te(this,vs,O(this,Ne).state),te(this,pi,this.options),O(this,vs).data!==void 0&&te(this,gi,O(this,Ne)),Qd(n,e))return;te(this,Nt,n);const s=()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,l=typeof o=="function"?o():o;if(l==="all"||!l&&!O(this,yi).size)return!0;const u=new Set(l??O(this,yi));return this.options.throwOnError&&u.add("error"),Object.keys(O(this,Nt)).some(d=>{const f=d;return O(this,Nt)[f]!==e[f]&&u.has(f)})};Ae(this,Me,qx).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ae(this,Me,tf).call(this)}},Ft=new WeakMap,Ne=new WeakMap,Qo=new WeakMap,Nt=new WeakMap,vs=new WeakMap,pi=new WeakMap,Xn=new WeakMap,Nr=new WeakMap,Ko=new WeakMap,mi=new WeakMap,gi=new WeakMap,xs=new WeakMap,ws=new WeakMap,Or=new WeakMap,yi=new WeakMap,Me=new WeakSet,Eo=function(e){Ae(this,Me,sf).call(this);let n=O(this,Ne).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(zt)),n},Jd=function(){Ae(this,Me,nf).call(this);const e=Ir(this.options.staleTime,O(this,Ne));if(ks||O(this,Nt).isStale||!qd(e))return;const s=Fx(O(this,Nt).dataUpdatedAt,e)+1;te(this,xs,cs.setTimeout(()=>{O(this,Nt).isStale||this.updateResult()},s))},Zd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,Ne)):this.options.refetchInterval)??!1},ef=function(e){Ae(this,Me,rf).call(this),te(this,Or,e),!(ks||ln(this.options.enabled,O(this,Ne))===!1||!qd(O(this,Or))||O(this,Or)===0)&&te(this,ws,cs.setInterval(()=>{(this.options.refetchIntervalInBackground||Xf.isFocused())&&Ae(this,Me,Eo).call(this)},O(this,Or)))},tf=function(){Ae(this,Me,Jd).call(this),Ae(this,Me,ef).call(this,Ae(this,Me,Zd).call(this))},nf=function(){O(this,xs)&&(cs.clearTimeout(O(this,xs)),te(this,xs,void 0))},rf=function(){O(this,ws)&&(cs.clearInterval(O(this,ws)),te(this,ws,void 0))},sf=function(){const e=O(this,Ft).getQueryCache().build(O(this,Ft),this.options);if(e===O(this,Ne))return;const n=O(this,Ne);te(this,Ne,e),te(this,Qo,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},qx=function(e){vt.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(O(this,Nt))}),O(this,Ft).getQueryCache().notify({query:O(this,Ne),type:"observerResultsUpdated"})})},D0);function VT(t,e){return ln(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function fy(t,e){return VT(t,e)||t.state.data!==void 0&&of(t,e,e.refetchOnMount)}function of(t,e,n){if(ln(e.enabled,t)!==!1&&Ir(e.staleTime,t)!=="static"){const s=typeof n=="function"?n(t):n;return s==="always"||s!==!1&&Yf(t,e)}return!1}function hy(t,e,n,s){return(t!==e||ln(s.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&Yf(t,n)}function Yf(t,e){return ln(e.enabled,t)!==!1&&t.isStaleByTime(Ir(e.staleTime,t))}function UT(t,e){return!Qd(t.getCurrentResult(),e)}function py(t){return{onFetch:(e,n)=>{var g,y,w,_,P;const s=e.options,o=(w=(y=(g=e.fetchOptions)==null?void 0:g.meta)==null?void 0:y.fetchMore)==null?void 0:w.direction,l=((_=e.state.data)==null?void 0:_.pages)||[],u=((P=e.state.data)==null?void 0:P.pageParams)||[];let d={pages:[],pageParams:[]},f=0;const p=async()=>{let E=!1;const S=k=>{OT(k,()=>e.signal,()=>E=!0)},b=Vx(e.options,e.fetchOptions),R=async(k,N,F)=>{if(E)return Promise.reject();if(N==null&&k.pages.length)return Promise.resolve(k);const q=(()=>{const ve={client:e.client,queryKey:e.queryKey,pageParam:N,direction:F?"backward":"forward",meta:e.options.meta};return S(ve),ve})(),z=await b(q),{maxPages:Y}=e.options,ne=F?NT:AT;return{pages:ne(k.pages,z,Y),pageParams:ne(k.pageParams,N,Y)}};if(o&&l.length){const k=o==="backward",N=k?BT:my,F={pages:l,pageParams:u},U=N(s,F);d=await R(F,U,k)}else{const k=t??l.length;do{const N=f===0?u[0]??s.initialPageParam:my(s,d);if(f>0&&N==null)break;d=await R(d,N),f++}while(f{var E,S;return(S=(E=e.options).persister)==null?void 0:S.call(E,p,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=p}}}function my(t,{pages:e,pageParams:n}){const s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,n[s],n):void 0}function BT(t,{pages:e,pageParams:n}){var s;return e.length>0?(s=t.getPreviousPageParam)==null?void 0:s.call(t,e[0],e,n[0],n):void 0}var Go,An,Ct,Ss,Nn,Tr,j0,$T=(j0=class extends Wx{constructor(e){super();me(this,Nn);me(this,Go);me(this,An);me(this,Ct);me(this,Ss);te(this,Go,e.client),this.mutationId=e.mutationId,te(this,Ct,e.mutationCache),te(this,An,[]),this.state=e.state||WT(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){O(this,An).includes(e)||(O(this,An).push(e),this.clearGcTimeout(),O(this,Ct).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){te(this,An,O(this,An).filter(n=>n!==e)),this.scheduleGc(),O(this,Ct).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){O(this,An).length||(this.state.status==="pending"?this.scheduleGc():O(this,Ct).remove(this))}continue(){var e;return((e=O(this,Ss))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var u,d,f,p,g,y,w,_,P,E,S,b,R,k,N,F,U,q;const n=()=>{Ae(this,Nn,Tr).call(this,{type:"continue"})},s={client:O(this,Go),meta:this.options.meta,mutationKey:this.options.mutationKey};te(this,Ss,$x({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(z,Y)=>{Ae(this,Nn,Tr).call(this,{type:"failed",failureCount:z,error:Y})},onPause:()=>{Ae(this,Nn,Tr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,Ct).canRun(this)}));const o=this.state.status==="pending",l=!O(this,Ss).canStart();try{if(o)n();else{Ae(this,Nn,Tr).call(this,{type:"pending",variables:e,isPaused:l}),O(this,Ct).config.onMutate&&await O(this,Ct).config.onMutate(e,this,s);const Y=await((d=(u=this.options).onMutate)==null?void 0:d.call(u,e,s));Y!==this.state.context&&Ae(this,Nn,Tr).call(this,{type:"pending",context:Y,variables:e,isPaused:l})}const z=await O(this,Ss).start();return await((p=(f=O(this,Ct).config).onSuccess)==null?void 0:p.call(f,z,e,this.state.context,this,s)),await((y=(g=this.options).onSuccess)==null?void 0:y.call(g,z,e,this.state.context,s)),await((_=(w=O(this,Ct).config).onSettled)==null?void 0:_.call(w,z,null,this.state.variables,this.state.context,this,s)),await((E=(P=this.options).onSettled)==null?void 0:E.call(P,z,null,e,this.state.context,s)),Ae(this,Nn,Tr).call(this,{type:"success",data:z}),z}catch(z){try{await((b=(S=O(this,Ct).config).onError)==null?void 0:b.call(S,z,e,this.state.context,this,s))}catch(Y){Promise.reject(Y)}try{await((k=(R=this.options).onError)==null?void 0:k.call(R,z,e,this.state.context,s))}catch(Y){Promise.reject(Y)}try{await((F=(N=O(this,Ct).config).onSettled)==null?void 0:F.call(N,void 0,z,this.state.variables,this.state.context,this,s))}catch(Y){Promise.reject(Y)}try{await((q=(U=this.options).onSettled)==null?void 0:q.call(U,void 0,z,e,this.state.context,s))}catch(Y){Promise.reject(Y)}throw Ae(this,Nn,Tr).call(this,{type:"error",error:z}),z}finally{O(this,Ct).runNext(this)}}},Go=new WeakMap,An=new WeakMap,Ct=new WeakMap,Ss=new WeakMap,Nn=new WeakSet,Tr=function(e){const n=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),vt.batch(()=>{O(this,An).forEach(s=>{s.onMutationUpdate(e)}),O(this,Ct).notify({mutation:this,type:"updated",action:e})})},j0);function WT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Yn,bn,Xo,L0,HT=(L0=class extends Jo{constructor(e={}){super();me(this,Yn);me(this,bn);me(this,Xo);this.config=e,te(this,Yn,new Set),te(this,bn,new Map),te(this,Xo,0)}build(e,n,s){const o=new $T({client:e,mutationCache:this,mutationId:++gl(this,Xo)._,options:e.defaultMutationOptions(n),state:s});return this.add(o),o}add(e){O(this,Yn).add(e);const n=bl(e);if(typeof n=="string"){const s=O(this,bn).get(n);s?s.push(e):O(this,bn).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(O(this,Yn).delete(e)){const n=bl(e);if(typeof n=="string"){const s=O(this,bn).get(n);if(s)if(s.length>1){const o=s.indexOf(e);o!==-1&&s.splice(o,1)}else s[0]===e&&O(this,bn).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=bl(e);if(typeof n=="string"){const s=O(this,bn).get(n),o=s==null?void 0:s.find(l=>l.state.status==="pending");return!o||o===e}else return!0}runNext(e){var s;const n=bl(e);if(typeof n=="string"){const o=(s=O(this,bn).get(n))==null?void 0:s.find(l=>l!==e&&l.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){vt.batch(()=>{O(this,Yn).forEach(e=>{this.notify({type:"removed",mutation:e})}),O(this,Yn).clear(),O(this,bn).clear()})}getAll(){return Array.from(O(this,Yn))}find(e){const n={exact:!0,...e};return this.getAll().find(s=>ay(n,s))}findAll(e={}){return this.getAll().filter(n=>ay(e,n))}notify(e){vt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return vt.batch(()=>Promise.all(e.map(n=>n.continue().catch(zt))))}},Yn=new WeakMap,bn=new WeakMap,Xo=new WeakMap,L0);function bl(t){var e;return(e=t.options.scope)==null?void 0:e.id}var On,M0,qT=(M0=class extends Jo{constructor(e={}){super();me(this,On);this.config=e,te(this,On,new Map)}build(e,n,s){const o=n.queryKey,l=n.queryHash??Kf(o,n);let u=this.get(l);return u||(u=new FT({client:e,queryKey:o,queryHash:l,options:e.defaultQueryOptions(n),state:s,defaultOptions:e.getQueryDefaults(o)}),this.add(u)),u}add(e){O(this,On).has(e.queryHash)||(O(this,On).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=O(this,On).get(e.queryHash);n&&(e.destroy(),n===e&&O(this,On).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){vt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return O(this,On).get(e)}getAll(){return[...O(this,On).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(s=>oy(n,s))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(s=>oy(e,s)):n}notify(e){vt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){vt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){vt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},On=new WeakMap,M0),Ke,Dr,jr,vi,xi,Lr,wi,Si,I0,QT=(I0=class{constructor(t={}){me(this,Ke);me(this,Dr);me(this,jr);me(this,vi);me(this,xi);me(this,Lr);me(this,wi);me(this,Si);te(this,Ke,t.queryCache||new qT),te(this,Dr,t.mutationCache||new HT),te(this,jr,t.defaultOptions||{}),te(this,vi,new Map),te(this,xi,new Map),te(this,Lr,0)}mount(){gl(this,Lr)._++,O(this,Lr)===1&&(te(this,wi,Xf.subscribe(async t=>{t&&(await this.resumePausedMutations(),O(this,Ke).onFocus())})),te(this,Si,$l.subscribe(async t=>{t&&(await this.resumePausedMutations(),O(this,Ke).onOnline())})))}unmount(){var t,e;gl(this,Lr)._--,O(this,Lr)===0&&((t=O(this,wi))==null||t.call(this),te(this,wi,void 0),(e=O(this,Si))==null||e.call(this),te(this,Si,void 0))}isFetching(t){return O(this,Ke).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return O(this,Dr).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=O(this,Ke).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=O(this,Ke).build(this,e),s=n.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Ir(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(t){return O(this,Ke).findAll(t).map(({queryKey:e,state:n})=>{const s=n.data;return[e,s]})}setQueryData(t,e,n){const s=this.defaultQueryOptions({queryKey:t}),o=O(this,Ke).get(s.queryHash),l=o==null?void 0:o.state.data,u=kT(e,l);if(u!==void 0)return O(this,Ke).build(this,s).setData(u,{...n,manual:!0})}setQueriesData(t,e,n){return vt.batch(()=>O(this,Ke).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=O(this,Ke).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=O(this,Ke);vt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=O(this,Ke);return vt.batch(()=>(n.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},s=vt.batch(()=>O(this,Ke).findAll(t).map(o=>o.cancel(n)));return Promise.all(s).then(zt).catch(zt)}invalidateQueries(t,e={}){return vt.batch(()=>(O(this,Ke).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},s=vt.batch(()=>O(this,Ke).findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,n);return n.throwOnError||(l=l.catch(zt)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(zt)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=O(this,Ke).build(this,e);return n.isStaleByTime(Ir(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(zt).catch(zt)}fetchInfiniteQuery(t){return t.behavior=py(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(zt).catch(zt)}ensureInfiniteQueryData(t){return t.behavior=py(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return $l.isOnline()?O(this,Dr).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Ke)}getMutationCache(){return O(this,Dr)}getDefaultOptions(){return O(this,jr)}setDefaultOptions(t){te(this,jr,t)}setQueryDefaults(t,e){O(this,vi).set(Fo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...O(this,vi).values()],n={};return e.forEach(s=>{zo(t,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(t,e){O(this,xi).set(Fo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...O(this,xi).values()],n={};return e.forEach(s=>{zo(t,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...O(this,jr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Kf(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Gf&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...O(this,jr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){O(this,Ke).clear(),O(this,Dr).clear()}},Ke=new WeakMap,Dr=new WeakMap,jr=new WeakMap,vi=new WeakMap,xi=new WeakMap,Lr=new WeakMap,wi=new WeakMap,Si=new WeakMap,I0),Qx=C.createContext(void 0),KT=t=>{const e=C.useContext(Qx);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},GT=({client:t,children:e})=>(C.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),v.jsx(Qx.Provider,{value:t,children:e})),Kx=C.createContext(!1),XT=()=>C.useContext(Kx);Kx.Provider;function YT(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var JT=C.createContext(YT()),ZT=()=>C.useContext(JT),ek=(t,e,n)=>{const s=n!=null&&n.state.error&&typeof t.throwOnError=="function"?Ux(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||s)&&(e.isReset()||(t.retryOnMount=!1))},tk=t=>{C.useEffect(()=>{t.clearReset()},[t])},nk=({result:t,errorResetBoundary:e,throwOnError:n,query:s,suspense:o})=>t.isError&&!e.isReset()&&!t.isFetching&&s&&(o&&t.data===void 0||Ux(n,[t.error,s])),rk=t=>{if(t.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),s=t.staleTime;t.staleTime=typeof s=="function"?(...o)=>n(s(...o)):n(s),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},sk=(t,e)=>t.isLoading&&t.isFetching&&!e,ik=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,gy=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function ok(t,e,n){var w,_,P,E;const s=XT(),o=ZT(),l=KT(),u=l.defaultQueryOptions(t);(_=(w=l.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||_.call(w,u);const d=l.getQueryCache().get(u.queryHash);u._optimisticResults=s?"isRestoring":"optimistic",rk(u),ek(u,o,d),tk(o);const f=!l.getQueryCache().get(u.queryHash),[p]=C.useState(()=>new e(l,u)),g=p.getOptimisticResult(u),y=!s&&t.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(S=>{const b=y?p.subscribe(vt.batchCalls(S)):zt;return p.updateResult(),b},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),C.useEffect(()=>{p.setOptions(u)},[u,p]),ik(u,g))throw gy(u,p,o);if(nk({result:g,errorResetBoundary:o,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw g.error;if((E=(P=l.getDefaultOptions().queries)==null?void 0:P._experimental_afterQuery)==null||E.call(P,u,g),u.experimental_prefetchInRender&&!ks&&sk(g,s)){const S=f?gy(u,p,o):d==null?void 0:d.promise;S==null||S.catch(zt).finally(()=>{p.updateResult()})}return u.notifyOnChangeProps?g:p.trackResult(g)}function ak(t,e){return ok(t,zT)}const lk=new QT({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Wl(){return Wl=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function Gx(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function ck(){return Math.random().toString(36).substr(2,8)}function vy(t,e){return{usr:t.state,key:t.key,idx:e}}function af(t,e,n,s){return n===void 0&&(n=null),Wl({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?ru(e):e,{state:n,key:e&&e.key||s||ck()})}function Xx(t){let{pathname:e="/",search:n="",hash:s=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function ru(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let s=t.indexOf("?");s>=0&&(e.search=t.substr(s),t=t.substr(0,s)),t&&(e.pathname=t)}return e}function dk(t,e,n,s){s===void 0&&(s={});let{window:o=document.defaultView,v5Compat:l=!1}=s,u=o.history,d=Mr.Pop,f=null,p=g();p==null&&(p=0,u.replaceState(Wl({},u.state,{idx:p}),""));function g(){return(u.state||{idx:null}).idx}function y(){d=Mr.Pop;let S=g(),b=S==null?null:S-p;p=S,f&&f({action:d,location:E.location,delta:b})}function w(S,b){d=Mr.Push;let R=af(E.location,S,b);p=g()+1;let k=vy(R,p),N=E.createHref(R);try{u.pushState(k,"",N)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;o.location.assign(N)}l&&f&&f({action:d,location:E.location,delta:1})}function _(S,b){d=Mr.Replace;let R=af(E.location,S,b);p=g();let k=vy(R,p),N=E.createHref(R);u.replaceState(k,"",N),l&&f&&f({action:d,location:E.location,delta:0})}function P(S){let b=o.location.origin!=="null"?o.location.origin:o.location.href,R=typeof S=="string"?S:Xx(S);return R=R.replace(/ $/,"%20"),Ut(b,"No window.location.(origin|href) available to create URL for href: "+R),new URL(R,b)}let E={get action(){return d},get location(){return t(o,u)},listen(S){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(yy,y),f=S,()=>{o.removeEventListener(yy,y),f=null}},createHref(S){return e(o,S)},createURL:P,encodeLocation(S){let b=P(S);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:w,replace:_,go(S){return u.go(S)}};return E}var xy;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(xy||(xy={}));function fk(t,e,n){return n===void 0&&(n="/"),hk(t,e,n)}function hk(t,e,n,s){let o=typeof e=="string"?ru(e):e,l=Zx(o.pathname||"/",n);if(l==null)return null;let u=Yx(t);pk(u);let d=null,f=Tk(l);for(let p=0;d==null&&p{let f={relativePath:d===void 0?l.path||"":d,caseSensitive:l.caseSensitive===!0,childrenIndex:u,route:l};f.relativePath.startsWith("/")&&(Ut(f.relativePath.startsWith(s),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(s.length));let p=ui([s,f.relativePath]),g=n.concat(f);l.children&&l.children.length>0&&(Ut(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),Yx(l.children,e,g,p)),!(l.path==null&&!l.index)&&e.push({path:p,score:Sk(p,l.index),routesMeta:g})};return t.forEach((l,u)=>{var d;if(l.path===""||!((d=l.path)!=null&&d.includes("?")))o(l,u);else for(let f of Jx(l.path))o(l,u,f)}),e}function Jx(t){let e=t.split("/");if(e.length===0)return[];let[n,...s]=e,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(s.length===0)return o?[l,""]:[l];let u=Jx(s.join("/")),d=[];return d.push(...u.map(f=>f===""?l:[l,f].join("/"))),o&&d.push(...u),d.map(f=>t.startsWith("/")&&f===""?"/":f)}function pk(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:bk(e.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}const mk=/^:[\w-]+$/,gk=3,yk=2,vk=1,xk=10,wk=-2,wy=t=>t==="*";function Sk(t,e){let n=t.split("/"),s=n.length;return n.some(wy)&&(s+=wk),e&&(s+=yk),n.filter(o=>!wy(o)).reduce((o,l)=>o+(mk.test(l)?gk:l===""?vk:xk),s)}function bk(t,e){return t.length===e.length&&t.slice(0,-1).every((s,o)=>s===e[o])?t[t.length-1]-e[e.length-1]:0}function Ek(t,e,n){let{routesMeta:s}=t,o={},l="/",u=[];for(let d=0;d{let{paramName:w,isOptional:_}=g;if(w==="*"){let E=d[y]||"";u=l.slice(0,l.length-E.length).replace(/(.)\/+$/,"$1")}const P=d[y];return _&&!P?p[w]=void 0:p[w]=(P||"").replace(/%2F/g,"/"),p},{}),pathname:l,pathnameBase:u,pattern:t}}function Ck(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Gx(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let s=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,f)=>(s.push({paramName:d,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(s.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,e?void 0:"i"),s]}function Tk(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Gx(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Zx(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,s=t.charAt(n);return s&&s!=="/"?null:t.slice(n)||"/"}const kk=t=>t.replace(/\/\/+/g,"/"),ui=t=>kk(t.join("/")),Pk=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/");function Rk(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const ew=["post","put","patch","delete"];new Set(ew);const Ak=["get",...ew];new Set(Ak);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Hl(){return Hl=Object.assign?Object.assign.bind():function(t){for(var e=1;eObject.assign({},S,{params:Object.assign({},d,S.params),pathname:ui([f,o.encodeLocation?o.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?f:ui([f,o.encodeLocation?o.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),l,n,s);return e&&E?C.createElement(Zo.Provider,{value:{location:Hl({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:Mr.Pop}},E):E}function Mk(){let t=Wk(),e=Rk(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},e),n?C.createElement("pre",{style:o},n):null,null)}const Ik=C.createElement(Mk,null);class Fk extends C.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?C.createElement(su.Provider,{value:this.props.routeContext},C.createElement(nw.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function zk(t){let{routeContext:e,match:n,children:s}=t,o=C.useContext(Nk);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(su.Provider,{value:e},s)}function Vk(t,e,n,s){var o;if(e===void 0&&(e=[]),n===void 0&&(n=null),s===void 0&&(s=null),t==null){var l;if(!n)return null;if(n.errors)t=n.matches;else if((l=s)!=null&&l.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let u=t,d=(o=n)==null?void 0:o.errors;if(d!=null){let g=u.findIndex(y=>y.route.id&&(d==null?void 0:d[y.route.id])!==void 0);g>=0||Ut(!1),u=u.slice(0,Math.min(u.length,g+1))}let f=!1,p=-1;if(n&&s&&s.v7_partialHydration)for(let g=0;g=0?u=u.slice(0,p+1):u=[u[0]];break}}}return u.reduceRight((g,y,w)=>{let _,P=!1,E=null,S=null;n&&(_=d&&y.route.id?d[y.route.id]:void 0,E=y.route.errorElement||Ik,f&&(p<0&&w===0?(Hk("route-fallback"),P=!0,S=null):p===w&&(P=!0,S=y.route.hydrateFallbackElement||null)));let b=e.concat(u.slice(0,w+1)),R=()=>{let k;return _?k=E:P?k=S:y.route.Component?k=C.createElement(y.route.Component,null):y.route.element?k=y.route.element:k=g,C.createElement(zk,{match:y,routeContext:{outlet:g,matches:b,isDataRoute:n!=null},children:k})};return n&&(y.route.ErrorBoundary||y.route.errorElement||w===0)?C.createElement(Fk,{location:n.location,revalidation:n.revalidation,component:E,error:_,children:R(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):R()},null)}var rw=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(rw||{});function Uk(t){let e=C.useContext(Ok);return e||Ut(!1),e}function Bk(t){let e=C.useContext(su);return e||Ut(!1),e}function $k(t){let e=Bk(),n=e.matches[e.matches.length-1];return n.route.id||Ut(!1),n.route.id}function Wk(){var t;let e=C.useContext(nw),n=Uk(rw.UseRouteError),s=$k();return e!==void 0?e:(t=n.errors)==null?void 0:t[s]}const Sy={};function Hk(t,e,n){Sy[t]||(Sy[t]=!0)}function qk(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function lf(t){Ut(!1)}function Qk(t){let{basename:e="/",children:n=null,location:s,navigationType:o=Mr.Pop,navigator:l,static:u=!1,future:d}=t;Jf()&&Ut(!1);let f=e.replace(/^\/*/,"/"),p=C.useMemo(()=>({basename:f,navigator:l,static:u,future:Hl({v7_relativeSplatPath:!1},d)}),[f,d,l,u]);typeof s=="string"&&(s=ru(s));let{pathname:g="/",search:y="",hash:w="",state:_=null,key:P="default"}=s,E=C.useMemo(()=>{let S=Zx(g,f);return S==null?null:{location:{pathname:S,search:y,hash:w,state:_,key:P},navigationType:o}},[f,g,y,w,_,P,o]);return E==null?null:C.createElement(tw.Provider,{value:p},C.createElement(Zo.Provider,{children:n,value:E}))}function Kk(t){let{children:e,location:n}=t;return jk(uf(e),n)}new Promise(()=>{});function uf(t,e){e===void 0&&(e=[]);let n=[];return C.Children.forEach(t,(s,o)=>{if(!C.isValidElement(s))return;let l=[...e,o];if(s.type===C.Fragment){n.push.apply(n,uf(s.props.children,l));return}s.type!==lf&&Ut(!1),!s.props.index||!s.props.children||Ut(!1);let u={id:s.props.id||l.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(u.children=uf(s.props.children,l)),n.push(u)}),n}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const Gk="6";try{window.__reactRouterVersion=Gk}catch{}const Xk="startTransition",by=z0[Xk];function Yk(t){let{basename:e,children:n,future:s,window:o}=t,l=C.useRef();l.current==null&&(l.current=uk({window:o,v5Compat:!0}));let u=l.current,[d,f]=C.useState({action:u.action,location:u.location}),{v7_startTransition:p}=s||{},g=C.useCallback(y=>{p&&by?by(()=>f(y)):f(y)},[f,p]);return C.useLayoutEffect(()=>u.listen(g),[u,g]),C.useEffect(()=>qk(s),[s]),C.createElement(Qk,{basename:e,children:n,location:d.location,navigationType:d.action,navigator:u,future:s})}var Ey;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Ey||(Ey={}));var _y;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(_y||(_y={}));function sw(t,e){return function(){return t.apply(e,arguments)}}const{toString:Jk}=Object.prototype,{getPrototypeOf:bi}=Object,{iterator:ea,toStringTag:iw}=Symbol,ql=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Vo=(t,e)=>{let n=t;const s=[];for(;n!=null&&n!==Object.prototype;){if(s.indexOf(n)!==-1)return!1;if(s.push(n),ql(n,e))return!0;n=bi(n)}return!1},Zk=(t,e)=>t!=null&&Vo(t,e)?t[e]:void 0,eh=(t=>e=>{const n=Jk.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),_n=t=>(t=t.toLowerCase(),e=>eh(e)===t),iu=t=>e=>typeof e===t,{isArray:Ps}=Array,Ei=iu("undefined");function ki(t){return t!==null&&!Ei(t)&&t.constructor!==null&&!Ei(t.constructor)&&Vt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ow=_n("ArrayBuffer");function eP(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ow(t.buffer),e}const tP=iu("string"),Vt=iu("function"),aw=iu("number"),Pi=t=>t!==null&&typeof t=="object",nP=t=>t===!0||t===!1,Ol=t=>{if(!Pi(t))return!1;const e=bi(t);return(e===null||e===Object.prototype||bi(e)===null)&&!Vo(t,iw)&&!Vo(t,ea)},rP=t=>{if(!Pi(t)||ki(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},sP=_n("Date"),iP=_n("File"),oP=t=>!!(t&&typeof t.uri<"u"),aP=t=>t&&typeof t.getParts<"u",lP=_n("Blob"),uP=_n("FileList"),cP=t=>Pi(t)&&Vt(t.pipe);function dP(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Cy=dP(),Ty=typeof Cy.FormData<"u"?Cy.FormData:void 0,fP=t=>{if(!t)return!1;if(Ty&&t instanceof Ty)return!0;const e=bi(t);if(!e||e===Object.prototype||!Vt(t.append))return!1;const n=eh(t);return n==="formdata"||n==="object"&&Vt(t.toString)&&t.toString()==="[object FormData]"},hP=_n("URLSearchParams"),[pP,mP,gP,yP]=["ReadableStream","Request","Response","Headers"].map(_n),vP=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ta(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let s,o;if(typeof t!="object"&&(t=[t]),Ps(t))for(s=0,o=t.length;s0;)if(o=n[s],e===o.toLowerCase())return o;return null}const ds=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,uw=t=>!Ei(t)&&t!==ds;function cf(...t){const{caseless:e,skipUndefined:n}=uw(this)&&this||{},s={},o=(l,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const d=e&&typeof u=="string"&&lw(s,u)||u,f=ql(s,d)?s[d]:void 0;Ol(f)&&Ol(l)?s[d]=cf(f,l):Ol(l)?s[d]=cf({},l):Ps(l)?s[d]=l.slice():(!n||!Ei(l))&&(s[d]=l)};for(let l=0,u=t.length;l(ta(e,(o,l)=>{n&&Vt(o)?Object.defineProperty(t,l,{__proto__:null,value:sw(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,l,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),t),wP=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),SP=(t,e,n,s)=>{t.prototype=Object.create(e.prototype,s),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),n&&Object.assign(t.prototype,n)},bP=(t,e,n,s)=>{let o,l,u;const d={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),l=o.length;l-- >0;)u=o[l],(!s||s(u,t,e))&&!d[u]&&(e[u]=t[u],d[u]=!0);t=n!==!1&&bi(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},EP=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const s=t.indexOf(e,n);return s!==-1&&s===n},_P=t=>{if(!t)return null;if(Ps(t))return t;let e=t.length;if(!aw(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},CP=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&bi(Uint8Array)),TP=(t,e)=>{const s=(t&&t[ea]).call(t);let o;for(;(o=s.next())&&!o.done;){const l=o.value;e.call(t,l[0],l[1])}},kP=(t,e)=>{let n;const s=[];for(;(n=t.exec(e))!==null;)s.push(n);return s},PP=_n("HTMLFormElement"),RP=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,o){return s.toUpperCase()+o}),{propertyIsEnumerable:AP}=Object.prototype,NP=_n("RegExp"),cw=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),s={};ta(n,(o,l)=>{let u;(u=e(o,l,t))!==!1&&(s[l]=u||o)}),Object.defineProperties(t,s)},OP=t=>{cw(t,(e,n)=>{if(Vt(t)&&["arguments","caller","callee"].includes(n))return!1;const s=t[n];if(Vt(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},DP=(t,e)=>{const n={},s=o=>{o.forEach(l=>{n[l]=!0})};return Ps(t)?s(t):s(String(t).split(e)),n},jP=()=>{},LP=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function MP(t){return!!(t&&Vt(t.append)&&t[iw]==="FormData"&&t[ea])}const IP=t=>{const e=new WeakSet,n=s=>{if(Pi(s)){if(e.has(s))return;if(ki(s))return s;if(!("toJSON"in s)){e.add(s);const o=Ps(s)?[]:{};return ta(s,(l,u)=>{const d=n(l);!Ei(d)&&(o[u]=d)}),e.delete(s),o}}return s};return n(t)},FP=_n("AsyncFunction"),zP=t=>t&&(Pi(t)||Vt(t))&&Vt(t.then)&&Vt(t.catch),dw=((t,e)=>t?setImmediate:e?((n,s)=>(ds.addEventListener("message",({source:o,data:l})=>{o===ds&&l===n&&s.length&&s.shift()()},!1),o=>{s.push(o),ds.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Vt(ds.postMessage)),VP=typeof queueMicrotask<"u"?queueMicrotask.bind(ds):typeof process<"u"&&process.nextTick||dw,fw=t=>t!=null&&Vt(t[ea]),UP=t=>t!=null&&Vo(t,ea)&&fw(t),L={isArray:Ps,isArrayBuffer:ow,isBuffer:ki,isFormData:fP,isArrayBufferView:eP,isString:tP,isNumber:aw,isBoolean:nP,isObject:Pi,isPlainObject:Ol,isEmptyObject:rP,isReadableStream:pP,isRequest:mP,isResponse:gP,isHeaders:yP,isUndefined:Ei,isDate:sP,isFile:iP,isReactNativeBlob:oP,isReactNative:aP,isBlob:lP,isRegExp:NP,isFunction:Vt,isStream:cP,isURLSearchParams:hP,isTypedArray:CP,isFileList:uP,forEach:ta,merge:cf,extend:xP,trim:vP,stripBOM:wP,inherits:SP,toFlatObject:bP,kindOf:eh,kindOfTest:_n,endsWith:EP,toArray:_P,forEachEntry:TP,matchAll:kP,isHTMLForm:PP,hasOwnProperty:ql,hasOwnProp:ql,hasOwnInPrototypeChain:Vo,getSafeProp:Zk,reduceDescriptors:cw,freezeMethods:OP,toObjectSet:DP,toCamelCase:RP,noop:jP,toFiniteNumber:LP,findKey:lw,global:ds,isContextDefined:uw,isSpecCompliantForm:MP,toJSONObject:IP,isAsyncFn:FP,isThenable:zP,setImmediate:dw,asap:VP,isIterable:fw,isSafeIterable:UP},BP=L.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),$P=t=>{const e={};let n,s,o;return t&&t.split(` `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),s=u.substring(o+1).trim(),!(!n||e[n]&&BP[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e};function WP(t){let e=0,n=t.length;for(;ee;){const s=t.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}const HP=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),qP=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function th(t,e){return L.isArray(t)?t.map(n=>th(n,e)):WP(String(t).replace(e,""))}const QP=t=>th(t,HP),KP=t=>th(t,qP);function hw(t){const e=Object.create(null);return L.forEach(t.toJSON(),(n,s)=>{e[s]=KP(n)}),e}const ky=Symbol("internals");function xo(t){return t&&String(t).trim().toLowerCase()}function Dl(t){return t===!1||t==null?t:L.isArray(t)?t.map(Dl):QP(String(t))}function GP(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const XP=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function pd(t,e,n,s,o){if(L.isFunction(s))return s.call(this,e,n);if(o&&(e=n),!!L.isString(e)){if(L.isString(s))return e.indexOf(s)!==-1;if(L.isRegExp(s))return s.test(e)}}function YP(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,s)=>n.toUpperCase()+s)}function JP(t,e){const n=L.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+n,{__proto__:null,value:function(o,l,u){return this[s].call(this,e,o,l,u)},configurable:!0})})}let Pt=class{constructor(e){e&&this.set(e)}set(e,n,s){const o=this;function l(d,f,p){const g=xo(f);if(!g)return;const y=L.findKey(o,g);(!y||o[y]===void 0||p===!0||p===void 0&&o[y]!==!1)&&(o[y||f]=Dl(d))}const u=(d,f)=>L.forEach(d,(p,g)=>l(p,g,f));if(L.isPlainObject(e)||e instanceof this.constructor)u(e,n);else if(L.isString(e)&&(e=e.trim())&&!XP(e))u($P(e),n);else if(L.isObject(e)&&L.isSafeIterable(e)){let d=Object.create(null),f,p;for(const g of e){if(!L.isArray(g))throw new TypeError("Object iterator must return a key-value pair");p=g[0],L.hasOwnProp(d,p)?(f=d[p],d[p]=L.isArray(f)?[...f,g[1]]:[f,g[1]]):d[p]=g[1]}u(d,n)}else e!=null&&l(n,e,s);return this}get(e,n){if(e=xo(e),e){const s=L.findKey(this,e);if(s){const o=this[s];if(!n)return o;if(n===!0)return GP(o);if(L.isFunction(n))return n.call(this,o,s);if(L.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=xo(e),e){const s=L.findKey(this,e);return!!(s&&this[s]!==void 0&&(!n||pd(this,this[s],s,n)))}return!1}delete(e,n){const s=this;let o=!1;function l(u){if(u=xo(u),u){const d=L.findKey(s,u);d&&(!n||pd(s,s[d],d,n))&&(delete s[d],o=!0)}}return L.isArray(e)?e.forEach(l):l(e),o}clear(e){const n=Object.keys(this);let s=n.length,o=!1;for(;s--;){const l=n[s];(!e||pd(this,this[l],l,e,!0))&&(delete this[l],o=!0)}return o}normalize(e){const n=this,s={};return L.forEach(this,(o,l)=>{const u=L.findKey(s,l);if(u){n[u]=Dl(o),delete n[l];return}const d=e?YP(l):String(l).trim();d!==l&&delete n[l],n[d]=Dl(o),s[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return L.forEach(this,(s,o)=>{s!=null&&s!==!1&&(n[o]=e&&L.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(o=>s.set(o)),s}static accessor(e){const s=(this[ky]=this[ky]={accessors:{}}).accessors,o=this.prototype;function l(u){const d=xo(u);s[d]||(JP(o,u),s[d]=!0)}return L.isArray(e)?e.forEach(l):l(e),this}};Pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);L.reduceDescriptors(Pt.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[n]=s}}});L.freezeMethods(Pt);const ZP="[REDACTED ****]";function eR(t){if(L.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(L.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function tR(t,e){const n=new Set(e.map(l=>String(l).toLowerCase())),s=[],o=l=>{if(l===null||typeof l!="object"||L.isBuffer(l))return l;if(s.indexOf(l)!==-1)return;l instanceof Pt&&(l=l.toJSON()),s.push(l);let u;if(L.isArray(l))u=[],l.forEach((d,f)=>{const p=o(d);L.isUndefined(p)||(u[f]=p)});else{if(!L.isPlainObject(l)&&eR(l))return s.pop(),l;u=Object.create(null);for(const[d,f]of Object.entries(l)){const p=n.has(d.toLowerCase())?ZP:o(f);L.isUndefined(p)||(u[d]=p)}}return s.pop(),u};return o(t)}let J=class pw extends Error{static from(e,n,s,o,l,u){const d=new pw(e.message,n||e.code,s,o,l);return Object.defineProperty(d,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),d.name=e.name,e.status!=null&&d.status==null&&(d.status=e.status),u&&Object.assign(d,u),d}constructor(e,n,s,o,l){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),o&&(this.request=o),l&&(this.response=l,this.status=l.status)}toJSON(){const e=this.config,n=e&&L.hasOwnProp(e,"redact")?e.redact:void 0,s=L.isArray(n)&&n.length>0?tR(e,n):L.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s,code:this.code,status:this.status}}};J.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";J.ERR_BAD_OPTION="ERR_BAD_OPTION";J.ECONNABORTED="ECONNABORTED";J.ETIMEDOUT="ETIMEDOUT";J.ECONNREFUSED="ECONNREFUSED";J.ERR_NETWORK="ERR_NETWORK";J.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";J.ERR_DEPRECATED="ERR_DEPRECATED";J.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";J.ERR_BAD_REQUEST="ERR_BAD_REQUEST";J.ERR_CANCELED="ERR_CANCELED";J.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";J.ERR_INVALID_URL="ERR_INVALID_URL";J.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const nR=null,mw=100;function df(t){return L.isPlainObject(t)||L.isArray(t)}function gw(t){return L.endsWith(t,"[]")?t.slice(0,-2):t}function md(t,e,n){return t?t.concat(e).map(function(o,l){return o=gw(o),!n&&l?"["+o+"]":o}).join(n?".":""):e}function rR(t){return L.isArray(t)&&!t.some(df)}const sR=L.toFlatObject(L,{},null,function(e){return/^is[A-Z]/.test(e)});function ou(t,e,n){if(!L.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=L.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(R,k){return!L.isUndefined(k[R])});const s=n.metaTokens,o=n.visitor||P,l=n.dots,u=n.indexes,d=n.Blob||typeof Blob<"u"&&Blob,f=n.maxDepth===void 0?mw:n.maxDepth,p=d&&L.isSpecCompliantForm(e),g=[];if(!L.isFunction(o))throw new TypeError("visitor must be a function");function y(b){if(b===null)return"";if(L.isDate(b))return b.toISOString();if(L.isBoolean(b))return b.toString();if(!p&&L.isBlob(b))throw new J("Blob is not supported. Use a Buffer instead.");if(L.isArrayBuffer(b)||L.isTypedArray(b)){if(p&&typeof d=="function")return new d([b]);if(typeof Buffer<"u")return Buffer.from(b);throw new J("Blob is not supported. Use a Buffer instead.",J.ERR_NOT_SUPPORT)}return b}function w(b){if(b>f)throw new J("Object is too deeply nested ("+b+" levels). Max depth: "+f,J.ERR_FORM_DATA_DEPTH_EXCEEDED)}function _(b,R){if(f===1/0)return JSON.stringify(b);const k=[];return JSON.stringify(b,function(F,U){if(!L.isObject(U))return U;for(;k.length&&k[k.length-1]!==this;)k.pop();return k.push(U),w(R+k.length-1),U})}function P(b,R,k){let N=b;if(L.isReactNative(e)&&L.isReactNativeBlob(b))return e.append(md(k,R,l),y(b)),!1;if(b&&!k&&typeof b=="object"){if(L.endsWith(R,"{}"))R=s?R:R.slice(0,-2),b=_(b,1);else if(L.isArray(b)&&rR(b)||(L.isFileList(b)||L.endsWith(R,"[]"))&&(N=L.toArray(b)))return R=gw(R),N.forEach(function(U,q){!(L.isUndefined(U)||U===null)&&e.append(u===!0?md([R],q,l):u===null?R:R+"[]",y(U))}),!1}return df(b)?!0:(e.append(md(k,R,l),y(b)),!1)}const E=Object.assign(sR,{defaultVisitor:P,convertValue:y,isVisitable:df});function S(b,R,k=0){if(!L.isUndefined(b)){if(w(k),g.indexOf(b)!==-1)throw new Error("Circular reference detected in "+R.join("."));g.push(b),L.forEach(b,function(F,U){(!(L.isUndefined(F)||F===null)&&o.call(e,F,L.isString(U)?U.trim():U,R,E))===!0&&S(F,R?R.concat(U):[U],k+1)}),g.pop()}}if(!L.isObject(t))throw new TypeError("data must be an object");return S(t),e}function Py(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(s){return e[s]})}function nh(t,e){this._pairs=[],t&&ou(t,this,e)}const yw=nh.prototype;yw.append=function(e,n){this._pairs.push([e,n])};yw.toString=function(e){const n=e?s=>e.call(this,s,Py):Py;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function iR(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function vw(t,e,n){if(!e)return t;t=t||"";const s=L.isFunction(n)?{serialize:n}:n,o=L.getSafeProp(s,"encode")||iR,l=L.getSafeProp(s,"serialize");let u;if(l?u=l(e,s):u=L.isURLSearchParams(e)?e.toString():new nh(e,s).toString(o),u){const d=t.indexOf("#");d!==-1&&(t=t.slice(0,d)),t+=(t.indexOf("?")===-1?"?":"&")+u}return t}class Ry{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){L.forEach(this.handlers,function(s){s!==null&&e(s)})}}const rh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},oR=typeof URLSearchParams<"u"?URLSearchParams:nh,aR=typeof FormData<"u"?FormData:null,lR=typeof Blob<"u"?Blob:null,uR={isBrowser:!0,classes:{URLSearchParams:oR,FormData:aR,Blob:lR},protocols:["http","https","file","blob","url","data"]},sh=typeof window<"u"&&typeof document<"u",ff=typeof navigator=="object"&&navigator||void 0,cR=sh&&(!ff||["ReactNative","NativeScript","NS"].indexOf(ff.product)<0),dR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fR=sh&&window.location.href||"http://localhost",hR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sh,hasStandardBrowserEnv:cR,hasStandardBrowserWebWorkerEnv:dR,navigator:ff,origin:fR},Symbol.toStringTag,{value:"Module"})),xt={...hR,...uR};function pR(t,e){return ou(t,new xt.classes.URLSearchParams,{visitor:function(n,s,o,l){return xt.isNode&&L.isBuffer(n)?(this.append(s,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...e})}const Ay=mw;function xw(t){if(t>Ay)throw new J("FormData field is too deeply nested ("+t+" levels). Max depth: "+Ay,J.ERR_FORM_DATA_DEPTH_EXCEEDED)}function mR(t){const e=[],n=/\w+|\[(\w*)]/g;let s;for(;(s=n.exec(t))!==null;)xw(e.length),e.push(s[0]==="[]"?"":s[1]||s[0]);return e}function gR(t){const e={},n=Object.keys(t);let s;const o=n.length;let l;for(s=0;s=n.length;return u=!u&&L.isArray(o)?o.length:u,f?(L.hasOwnProp(o,u)?o[u]=L.isArray(o[u])?o[u].concat(s):[o[u],s]:o[u]=s,!d):((!L.hasOwnProp(o,u)||!L.isObject(o[u]))&&(o[u]=[]),e(n,s,o[u],l)&&L.isArray(o[u])&&(o[u]=gR(o[u])),!d)}if(L.isFormData(t)&&L.isFunction(t.entries)){const n={};return L.forEachEntry(t,(s,o)=>{e(mR(s),o,n,0)}),n}return null}const ni=(t,e)=>t!=null&&L.hasOwnProp(t,e)?t[e]:void 0;function yR(t,e,n){if(L.isString(t))try{return(e||JSON.parse)(t),L.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(t)}const na={transitional:rh,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const s=n.getContentType()||"",o=s.indexOf("application/json")>-1,l=L.isObject(e);if(l&&L.isHTMLForm(e)&&(e=new FormData(e)),L.isFormData(e))return o?JSON.stringify(ww(e)):e;if(L.isArrayBuffer(e)||L.isBuffer(e)||L.isStream(e)||L.isFile(e)||L.isBlob(e)||L.isReadableStream(e))return e;if(L.isArrayBufferView(e))return e.buffer;if(L.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(l){const f=ni(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return pR(e,f).toString();if((d=L.isFileList(e))||s.indexOf("multipart/form-data")>-1){const p=ni(this,"env"),g=p&&p.FormData;return ou(d?{"files[]":e}:e,g&&new g,f)}}return l||o?(n.setContentType("application/json",!1),yR(e)):e}],transformResponse:[function(e){const n=ni(this,"transitional")||na.transitional,s=n&&n.forcedJSONParsing,o=ni(this,"responseType"),l=o==="json";if(L.isResponse(e)||L.isReadableStream(e))return e;if(e&&L.isString(e)&&(s&&!o||l)){const d=!(n&&n.silentJSONParsing)&&l;try{return JSON.parse(e,ni(this,"parseReviver"))}catch(f){if(d)throw f.name==="SyntaxError"?J.from(f,J.ERR_BAD_RESPONSE,this,null,ni(this,"response")):f}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};L.forEach(["delete","get","head","post","put","patch","query"],t=>{na.headers[t]={}});function gd(t,e){const n=this||na,s=e||n,o=Pt.from(s.headers);let l=s.data;return L.forEach(t,function(d){l=d.call(n,l,o.normalize(),e?e.status:void 0)}),o.normalize(),l}function Sw(t){return!!(t&&t.__CANCEL__)}let ra=class extends J{constructor(e,n,s){super(e??"canceled",J.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function bw(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new J("Request failed with status code "+n.status,n.status>=400&&n.status<500?J.ERR_BAD_REQUEST:J.ERR_BAD_RESPONSE,n.config,n.request,n))}function vR(t){const e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}function xR(t,e){t=t||10;const n=new Array(t),s=new Array(t);let o=0,l=0,u;return e=e!==void 0?e:1e3,function(f){const p=Date.now(),g=s[l];u||(u=p),n[o]=f,s[o]=p;let y=l,w=0;for(;y!==o;)w+=n[y++],y=y%t;if(o=(o+1)%t,o===l&&(l=(l+1)%t),p-u{n=g,o=null,l&&(clearTimeout(l),l=null),t(...p)};return[(...p)=>{const g=Date.now(),y=g-n;y>=s?u(p,g):(o=p,l||(l=setTimeout(()=>{l=null,u(o)},s-y)))},()=>o&&u(o)]}const Ql=(t,e,n=3)=>{let s=0;const o=xR(50,250);return wR(l=>{if(!l||typeof l.loaded!="number")return;const u=l.loaded,d=l.lengthComputable?l.total:void 0,f=d!=null?Math.min(u,d):u,p=Math.max(0,f-s),g=o(p);s=Math.max(s,f);const y={loaded:f,total:d,progress:d?f/d:void 0,bytes:p,rate:g||void 0,estimated:g&&d?(d-f)/g:void 0,event:l,lengthComputable:d!=null,[e?"download":"upload"]:!0};t(y)},n)},Ny=(t,e)=>{const n=t!=null;return[s=>e[0]({lengthComputable:n,total:t,loaded:s}),e[1]]},Oy=t=>(...e)=>L.asap(()=>t(...e)),SR=xt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,xt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(xt.origin),xt.navigator&&/(msie|trident)/i.test(xt.navigator.userAgent)):()=>!0,bR=xt.hasStandardBrowserEnv?{write(t,e,n,s,o,l,u){if(typeof document>"u")return;const d=[`${t}=${encodeURIComponent(e)}`];L.isNumber(n)&&d.push(`expires=${new Date(n).toUTCString()}`),L.isString(s)&&d.push(`path=${s}`),L.isString(o)&&d.push(`domain=${o}`),l===!0&&d.push("secure"),L.isString(u)&&d.push(`SameSite=${u}`),document.cookie=d.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.split(";");for(let n=0;nt instanceof Pt?{...t}:t;function Rs(t,e){t=t||{},e=e||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(g,y,w,_){return L.isPlainObject(g)&&L.isPlainObject(y)?L.merge.call({caseless:_},g,y):L.isPlainObject(y)?L.merge({},y):L.isArray(y)?y.slice():y}function o(g,y,w,_){if(L.isUndefined(y)){if(!L.isUndefined(g))return s(void 0,g,w,_)}else return s(g,y,w,_)}function l(g,y){if(!L.isUndefined(y))return s(void 0,y)}function u(g,y){if(L.isUndefined(y)){if(!L.isUndefined(g))return s(void 0,g)}else return s(void 0,y)}function d(g){const y=L.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!L.isUndefined(y))if(L.isPlainObject(y)){if(L.hasOwnProp(y,g))return y[g]}else return;const w=L.hasOwnProp(t,"transitional")?t.transitional:void 0;if(L.isPlainObject(w)&&L.hasOwnProp(w,g))return w[g]}function f(g,y,w){if(L.hasOwnProp(e,w))return s(g,y);if(L.hasOwnProp(t,w))return s(void 0,g)}const p={url:l,method:l,data:l,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:f,headers:(g,y,w)=>o(jy(g),jy(y),w,!0)};return L.forEach(Object.keys({...t,...e}),function(y){if(y==="__proto__"||y==="constructor"||y==="prototype")return;const w=L.hasOwnProp(p,y)?p[y]:o,_=L.hasOwnProp(t,y)?t[y]:void 0,P=L.hasOwnProp(e,y)?e[y]:void 0,E=w(_,P,y);L.isUndefined(E)&&w!==f||(n[y]=E)}),L.hasOwnProp(e,"validateStatus")&&L.isUndefined(e.validateStatus)&&d("validateStatusUndefinedResolves")===!1&&(L.hasOwnProp(t,"validateStatus")?n.validateStatus=s(void 0,t.validateStatus):delete n.validateStatus),n}const RR=["content-type","content-length"];function AR(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([s,o])=>{RR.includes(s.toLowerCase())&&t.set(s,o)})}const NR=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16)));function _w(t){const e=Rs({},t),n=w=>L.hasOwnProp(e,w)?e[w]:void 0,s=n("data");let o=n("withXSRFToken");const l=n("xsrfHeaderName"),u=n("xsrfCookieName");let d=n("headers");const f=n("auth"),p=n("baseURL"),g=n("allowAbsoluteUrls"),y=n("url");if(e.headers=d=Pt.from(d),e.url=vw(Ew(p,y,g,e),n("params"),n("paramsSerializer")),f){const w=L.getSafeProp(f,"username")||"",_=L.getSafeProp(f,"password")||"";try{d.set("Authorization","Basic "+btoa(w+":"+(_?NR(_):"")))}catch(P){throw J.from(P,J.ERR_BAD_OPTION_VALUE,t)}}if(L.isFormData(s)&&(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv||L.isReactNative(s)?d.setContentType(void 0):L.isFunction(s.getHeaders)&&AR(d,s.getHeaders(),n("formDataHeaderPolicy"))),xt.hasStandardBrowserEnv&&(L.isFunction(o)&&(o=o(e)),o===!0||o==null&&SR(e.url))){const _=l&&u&&bR.read(u);_&&d.set(l,_)}return e}const OR=typeof XMLHttpRequest<"u",DR=OR&&function(t){return new Promise(function(n,s){const o=_w(t);let l=o.data;const u=Pt.from(o.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:p}=o,g,y,w,_,P;function E(){_&&_(),P&&P(),o.cancelToken&&o.cancelToken.unsubscribe(g),o.signal&&o.signal.removeEventListener("abort",g)}let S=new XMLHttpRequest;S.open(o.method.toUpperCase(),o.url,!0),S.timeout=o.timeout;function b(){if(!S)return;const k=Pt.from("getAllResponseHeaders"in S&&S.getAllResponseHeaders()),F={data:!d||d==="text"||d==="json"?S.responseText:S.response,status:S.status,statusText:S.statusText,headers:k,config:t,request:S};bw(function(q){n(q),E()},function(q){s(q),E()},F),S=null}"onloadend"in S?S.onloadend=b:S.onreadystatechange=function(){!S||S.readyState!==4||S.status===0&&!(S.responseURL&&S.responseURL.startsWith("file:"))||setTimeout(b)},S.onabort=function(){S&&(s(new J("Request aborted",J.ECONNABORTED,t,S)),E(),S=null)},S.onerror=function(N){const F=N&&N.message?N.message:"Network Error",U=new J(F,J.ERR_NETWORK,t,S);U.event=N||null,s(U),E(),S=null},S.ontimeout=function(){let N=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const F=o.transitional||rh;o.timeoutErrorMessage&&(N=o.timeoutErrorMessage),s(new J(N,F.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,t,S)),E(),S=null},l===void 0&&u.setContentType(null),"setRequestHeader"in S&&L.forEach(hw(u),function(N,F){S.setRequestHeader(F,N)}),L.isUndefined(o.withCredentials)||(S.withCredentials=!!o.withCredentials),d&&d!=="json"&&(S.responseType=o.responseType),p&&([w,P]=Ql(p,!0),S.addEventListener("progress",w)),f&&S.upload&&([y,_]=Ql(f),S.upload.addEventListener("progress",y),S.upload.addEventListener("loadend",_)),(o.cancelToken||o.signal)&&(g=k=>{S&&(s(!k||k.type?new ra(null,t,S):k),S.abort(),E(),S=null)},o.cancelToken&&o.cancelToken.subscribe(g),o.signal&&(o.signal.aborted?g():o.signal.addEventListener("abort",g)));const R=vR(o.url);if(R&&!xt.protocols.includes(R)){s(new J("Unsupported protocol "+R+":",J.ERR_BAD_REQUEST,t)),E();return}S.send(l||null)})},jR=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;const n=new AbortController;let s=!1;const o=function(f){if(!s){s=!0,u();const p=f instanceof Error?f:this.reason;n.abort(p instanceof J?p:new ra(p instanceof Error?p.message:p))}};let l=e&&setTimeout(()=>{l=null,o(new J(`timeout of ${e}ms exceeded`,J.ETIMEDOUT))},e);const u=()=>{t&&(l&&clearTimeout(l),l=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(o):f.removeEventListener("abort",o)}),t=null)};t.forEach(f=>f.addEventListener("abort",o,{once:!0}));const{signal:d}=n;return d.unsubscribe=()=>L.asap(u),d},LR=function*(t,e){let n=t.byteLength;if(n{const o=MR(t,e);let l=0,u,d=f=>{u||(u=!0,s&&s(f))};return new ReadableStream({async pull(f){try{const{done:p,value:g}=await o.next();if(p){d(),f.close();return}let y=g.byteLength;if(n){let w=l+=y;n(w)}f.enqueue(new Uint8Array(g))}catch(p){throw d(p),p}},cancel(f){return d(f),o.return()}},{highWaterMark:2})},Kl=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,FR=(t,e,n)=>e+2_>=2&&s.charCodeAt(_-2)===37&&s.charCodeAt(_-1)===51&&(s.charCodeAt(_)===68||s.charCodeAt(_)===100);p>=0&&(s.charCodeAt(p)===61?(f++,p--):g(p)&&(f++,p-=3)),f===1&&p>=0&&(s.charCodeAt(p)===61||g(p))&&f++;const w=Math.floor(u/4)*3-(f||0);return w>0?w:0}let l=0;for(let u=0,d=s.length;u=55296&&f<=56319&&u+1=56320&&p<=57343?(l+=4,u++):l+=3}else l+=3}return l}const ih="1.18.1",My=64*1024,{isFunction:El}=L,VR=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),Iy=t=>{if(!L.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},Fy=(t,...e)=>{try{return!!t(...e)}catch{return!1}},UR=t=>{const e=t.indexOf("://");let n=t;return e!==-1&&(n=n.slice(e+3)),n.includes("@")||n.includes(":")},BR=t=>{const e=L.global!==void 0&&L.global!==null?L.global:globalThis,{ReadableStream:n,TextEncoder:s}=e;t=L.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);const{fetch:o,Request:l,Response:u}=t,d=o?El(o):typeof fetch=="function",f=El(l),p=El(u);if(!d)return!1;const g=d&&El(n),y=d&&(typeof s=="function"?(b=>R=>b.encode(R))(new s):async b=>new Uint8Array(await new l(b).arrayBuffer())),w=f&&g&&Fy(()=>{let b=!1;const R=new l(xt.origin,{body:new n,method:"POST",get duplex(){return b=!0,"half"}}),k=R.headers.has("Content-Type");return R.body!=null&&R.body.cancel(),b&&!k}),_=p&&g&&Fy(()=>L.isReadableStream(new u("").body)),P={stream:_&&(b=>b.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!P[b]&&(P[b]=(R,k)=>{let N=R&&R[b];if(N)return N.call(R);throw new J(`Response type '${b}' is not supported`,J.ERR_NOT_SUPPORT,k)})});const E=async b=>{if(b==null)return 0;if(L.isBlob(b))return b.size;if(L.isSpecCompliantForm(b))return(await new l(xt.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(L.isArrayBufferView(b)||L.isArrayBuffer(b))return b.byteLength;if(L.isURLSearchParams(b)&&(b=b+""),L.isString(b))return(await y(b)).byteLength},S=async(b,R)=>{const k=L.toFiniteNumber(b.getContentLength());return k??E(R)};return async b=>{let{url:R,method:k,data:N,signal:F,cancelToken:U,timeout:q,onDownloadProgress:z,onUploadProgress:Y,responseType:ne,headers:ve,withCredentials:Te="same-origin",fetchOptions:Se,maxContentLength:Z,maxBodyLength:Ce}=_w(b);const _e=L.isNumber(Z)&&Z>-1,ce=L.isNumber(Ce)&&Ce>-1,K=X=>L.hasOwnProp(b,X)?b[X]:void 0;let se=o||fetch;ne=ne?(ne+"").toLowerCase():"text";let B=jR([F,U&&U.toAbortSignal()],q),j=null;const $=B&&B.unsubscribe&&(()=>{B.unsubscribe()});let de,ge=null;const pe=()=>new J("Request body larger than maxBodyLength limit",J.ERR_BAD_REQUEST,b,j);try{let X;const be=K("auth");if(be){const Ee=L.getSafeProp(be,"username")||"",ht=L.getSafeProp(be,"password")||"";X={username:Ee,password:ht}}if(UR(R)){const Ee=new URL(R,xt.origin);if(!X&&(Ee.username||Ee.password)){const ht=Iy(Ee.username),dn=Iy(Ee.password);X={username:ht,password:dn}}(Ee.username||Ee.password)&&(Ee.username="",Ee.password="",R=Ee.href)}if(X&&(ve.delete("authorization"),ve.set("Authorization","Basic "+btoa(VR((X.username||"")+":"+(X.password||""))))),_e&&typeof R=="string"&&R.startsWith("data:")&&zR(R)>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,b,j);if(ce&&k!=="get"&&k!=="head"){const Ee=await E(N);if(typeof Ee=="number"&&isFinite(Ee)&&(de=Ee,Ee>Ce))throw pe()}const Re=ce&&(L.isReadableStream(N)||L.isStream(N)),we=(Ee,ht,dn)=>Ly(Ee,My,fn=>{if(ce&&fn>Ce)throw ge=pe();ht&&ht(fn)},dn);if(w&&k!=="get"&&k!=="head"&&(Y||Re)){if(de=de??await S(ve,N),de!==0||Re){let Ee=new l(R,{method:"POST",body:N,duplex:"half"}),ht;if(L.isFormData(N)&&(ht=Ee.headers.get("content-type"))&&ve.setContentType(ht),Ee.body){const[dn,fn]=Y&&Ny(de,Ql(Oy(Y)))||[];N=we(Ee.body,dn,fn)}}}else if(Re&&!f&&g&&k!=="get"&&k!=="head")N=we(N);else if(Re&&f&&!w&&k!=="get"&&k!=="head")throw new J("Stream request bodies are not supported by the current fetch implementation",J.ERR_NOT_SUPPORT,b,j);L.isString(Te)||(Te=Te?"include":"omit");const at=f&&"credentials"in l.prototype;if(L.isFormData(N)){const Ee=ve.getContentType();Ee&&/^multipart\/form-data/i.test(Ee)&&!/boundary=/i.test(Ee)&&ve.delete("content-type")}ve.set("User-Agent","axios/"+ih,!1);const Gt={...Se,signal:B,method:k.toUpperCase(),headers:hw(ve.normalize()),body:N,duplex:"half",credentials:at?Te:void 0};j=f&&new l(R,Gt);let ft=await(f?se(j,Se):se(R,Gt));const cn=Pt.from(ft.headers);if(_e){const Ee=L.toFiniteNumber(cn.getContentLength());if(Ee!=null&&Ee>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,b,j)}const Xt=_&&(ne==="stream"||ne==="response");if(_&&ft.body&&(z||_e||Xt&&$)){const Ee={};["status","statusText","headers"].forEach(Fn=>{Ee[Fn]=ft[Fn]});const ht=L.toFiniteNumber(cn.getContentLength()),[dn,fn]=z&&Ny(ht,Ql(Oy(z),!0))||[];let nr=0;const rr=Fn=>{if(_e&&(nr=Fn,nr>Z))throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,b,j);dn&&dn(Fn)};ft=new u(Ly(ft.body,My,rr,()=>{fn&&fn(),$&&$()}),Ee)}ne=ne||"text";let Yt=await P[L.findKey(P,ne)||"text"](ft,b);if(_e&&!_&&!Xt){let Ee;if(Yt!=null&&(typeof Yt.byteLength=="number"?Ee=Yt.byteLength:typeof Yt.size=="number"?Ee=Yt.size:typeof Yt=="string"&&(Ee=typeof s=="function"?new s().encode(Yt).byteLength:Yt.length)),typeof Ee=="number"&&Ee>Z)throw new J("maxContentLength size of "+Z+" exceeded",J.ERR_BAD_RESPONSE,b,j)}return!Xt&&$&&$(),await new Promise((Ee,ht)=>{bw(Ee,ht,{data:Yt,headers:Pt.from(ft.headers),status:ft.status,statusText:ft.statusText,config:b,request:j})})}catch(X){if($&&$(),B&&B.aborted&&B.reason instanceof J){const be=B.reason;throw be.config=b,j&&(be.request=j),X!==be&&Object.defineProperty(be,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),be}if(ge)throw j&&!ge.request&&(ge.request=j),ge;if(X instanceof J)throw j&&!X.request&&(X.request=j),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const be=new J("Network Error",J.ERR_NETWORK,b,j,X&&X.response);throw Object.defineProperty(be,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),be}throw J.from(X,X&&X.code,b,j,X&&X.response)}}},$R=new Map,Cw=t=>{let e=t&&t.env||{};const{fetch:n,Request:s,Response:o}=e,l=[s,o,n];let u=l.length,d=u,f,p,g=$R;for(;d--;)f=l[d],p=g.get(f),p===void 0&&g.set(f,p=d?new Map:BR(e)),g=p;return p};Cw();const oh={http:nR,xhr:DR,fetch:{get:Cw}};L.forEach(oh,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});const zy=t=>`- ${t}`,WR=t=>L.isFunction(t)||t===null||t===!1;function HR(t,e){t=L.isArray(t)?t:[t];const{length:n}=t;let s,o;const l={};for(let u=0;u`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let d=n?u.length>1?`since : `+u.map(zy).join(` `):" "+zy(u[0]):"as no adapter specified";throw new J("There is no suitable adapter to dispatch the request "+d,J.ERR_NOT_SUPPORT)}return o}const Tw={getAdapter:HR,adapters:oh};function yd(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ra(null,t)}function Vy(t){return yd(t),t.headers=Pt.from(t.headers),t.data=gd.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Tw.getAdapter(t.adapter||na.adapter,t)(t).then(function(s){yd(t),t.response=s;try{s.data=gd.call(t,t.transformResponse,s)}finally{delete t.response}return s.headers=Pt.from(s.headers),s},function(s){if(!Sw(s)&&(yd(t),s&&s.response)){t.response=s.response;try{s.response.data=gd.call(t,t.transformResponse,s.response)}finally{delete t.response}s.response.headers=Pt.from(s.response.headers)}return Promise.reject(s)})}const au={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{au[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Uy={};au.transitional=function(e,n,s){function o(l,u){return"[Axios v"+ih+"] Transitional option '"+l+"'"+u+(s?". "+s:"")}return(l,u,d)=>{if(e===!1)throw new J(o(u," has been removed"+(n?" in "+n:"")),J.ERR_DEPRECATED);return n&&!Uy[u]&&(Uy[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,u,d):!0}};au.spelling=function(e){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function qR(t,e,n){if(typeof t!="object"||t===null)throw new J("options must be an object",J.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let o=s.length;for(;o-- >0;){const l=s[o],u=Object.prototype.hasOwnProperty.call(e,l)?e[l]:void 0;if(u){const d=t[l],f=d===void 0||u(d,l,t);if(f!==!0)throw new J("option "+l+" must be "+f,J.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new J("Unknown option "+l,J.ERR_BAD_OPTION)}}const jl={assertOptions:qR,validators:au},_t=jl.validators;let bs=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ry,response:new Ry}}async request(e,n){try{return await this._request(e,n)}catch(s){if(s instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const l=(()=>{if(!o.stack)return"";const u=o.stack.indexOf(` `);return u===-1?"":o.stack.slice(u+1)})();try{if(!s.stack)s.stack=l;else if(l){const u=l.indexOf(` `),d=u===-1?-1:l.indexOf(` `,u+1),f=d===-1?"":l.slice(d+1);String(s.stack).endsWith(f)||(s.stack+=` `+l)}}catch{}}throw s}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Rs(this.defaults,n);const{transitional:s,paramsSerializer:o,headers:l}=n;s!==void 0&&jl.assertOptions(s,{silentJSONParsing:_t.transitional(_t.boolean),forcedJSONParsing:_t.transitional(_t.boolean),clarifyTimeoutError:_t.transitional(_t.boolean),legacyInterceptorReqResOrdering:_t.transitional(_t.boolean),advertiseZstdAcceptEncoding:_t.transitional(_t.boolean),validateStatusUndefinedResolves:_t.transitional(_t.boolean)},!1),o!=null&&(L.isFunction(o)?n.paramsSerializer={serialize:o}:jl.assertOptions(o,{encode:_t.function,serialize:_t.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),jl.assertOptions(n,{baseUrl:_t.spelling("baseURL"),withXsrfToken:_t.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=l&&L.merge(l.common,l[n.method]);l&&L.forEach(["delete","get","head","post","put","patch","query","common"],P=>{delete l[P]}),n.headers=Pt.concat(u,l);const d=[];let f=!0;this.interceptors.request.forEach(function(E){if(typeof E.runWhen=="function"&&E.runWhen(n)===!1)return;f=f&&E.synchronous;const S=n.transitional||rh;S&&S.legacyInterceptorReqResOrdering?d.unshift(E.fulfilled,E.rejected):d.push(E.fulfilled,E.rejected)});const p=[];this.interceptors.response.forEach(function(E){p.push(E.fulfilled,E.rejected)});let g,y=0,w;if(!f){const P=[Vy.bind(this),void 0];for(P.unshift(...d),P.push(...p),w=P.length,g=Promise.resolve(n);y{if(!s._listeners)return;let l=s._listeners.length;for(;l-- >0;)s._listeners[l](o);s._listeners=null}),this.promise.then=o=>{let l;const u=new Promise(d=>{s.subscribe(d),l=d}).then(o);return u.cancel=function(){s.unsubscribe(l)},u},e(function(l,u,d){s.reason||(s.reason=new ra(l,u,d),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=s=>{e.abort(s)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new kw(function(o){e=o}),cancel:e}}};function KR(t){return function(n){return t.apply(null,n)}}function GR(t){return L.isObject(t)&&t.isAxiosError===!0}const hf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(hf).forEach(([t,e])=>{hf[e]=t});function Pw(t){const e=new bs(t),n=sw(bs.prototype.request,e);return L.extend(n,bs.prototype,e,{allOwnKeys:!0}),L.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return Pw(Rs(t,o))},n}const et=Pw(na);et.Axios=bs;et.CanceledError=ra;et.CancelToken=QR;et.isCancel=Sw;et.VERSION=ih;et.toFormData=ou;et.AxiosError=J;et.Cancel=et.CanceledError;et.all=function(e){return Promise.all(e)};et.spread=KR;et.isAxiosError=GR;et.mergeConfig=Rs;et.AxiosHeaders=Pt;et.formToJSON=t=>ww(L.isHTMLForm(t)?new FormData(t):t);et.getAdapter=Tw.getAdapter;et.HttpStatusCode=hf;et.default=et;const{Axios:pM,AxiosError:mM,CanceledError:gM,isCancel:yM,CancelToken:vM,VERSION:xM,all:wM,Cancel:SM,isAxiosError:bM,spread:EM,toFormData:_M,AxiosHeaders:CM,HttpStatusCode:TM,formToJSON:kM,getAdapter:PM,mergeConfig:RM,create:AM}=et,Rw=typeof window>"u",By=!Rw&&window.self!==window.top,XR=!Rw&&typeof document>"u",vd=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),gt=[];for(let t=0;t<256;++t)gt.push((t+256).toString(16).slice(1));function YR(t,e=0){return(gt[t[e+0]]+gt[t[e+1]]+gt[t[e+2]]+gt[t[e+3]]+"-"+gt[t[e+4]]+gt[t[e+5]]+"-"+gt[t[e+6]]+gt[t[e+7]]+"-"+gt[t[e+8]]+gt[t[e+9]]+"-"+gt[t[e+10]]+gt[t[e+11]]+gt[t[e+12]]+gt[t[e+13]]+gt[t[e+14]]+gt[t[e+15]]).toLowerCase()}let xd;const JR=new Uint8Array(16);function ZR(){if(!xd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");xd=crypto.getRandomValues.bind(crypto)}return xd(JR)}const eA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$y={randomUUID:eA};function tA(t,e,n){var o;t=t||{};const s=t.random??((o=t.rng)==null?void 0:o.call(t))??ZR();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,YR(s)}function nA(t,e,n){return $y.randomUUID&&!t?$y.randomUUID():tA(t)}const wo=typeof window<"u"?window:{base44SharedInstances:{}};function rA(t,e){return wo.base44SharedInstances||(wo.base44SharedInstances={}),wo.base44SharedInstances[t]||(wo.base44SharedInstances[t]={instance:e()}),wo.base44SharedInstances[t].instance}const sA="__user_heartbeat_event__",iA="__initialization_event__",oA="__session_duration_event__",Wy="analytics-enable",Hy="base44_analytics_session_id",aA={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},lA="analytics",Fe=rA(lA,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...aA,...gA()}})),uA=({axiosClient:t,serverUrl:e,appId:n,userAuthModule:s})=>{var o;const{maxQueueSize:l,throttleTime:u,batchSize:d}=Fe.config;if(!(!((o=Fe.config)===null||o===void 0)&&o.enabled)||XR)return{track:()=>{},cleanup:()=>{}};let f;const p=`${e}/api/apps/${n}/analytics/track/batch`,g=async k=>{await t.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:k}})},y=k=>{try{const N=JSON.stringify({events:k}),F=new Blob([N],{type:"application/json"});return typeof navigator>"u"||N.length>6e4||!navigator.sendBeacon(p,F)}catch{return!1}},w=async(k,N={})=>{if(k.length===0)return;const F=await mA(s),U=k.map(pA(F));try{(!N.isBeacon||!y(U))&&await g(U)}catch{}},_=()=>{Qy(w,{throttleTime:u,batchSize:d})},P=k=>{if(Fe.requestsQueue.length>=l)return;const N=hA();Fe.requestsQueue.push({...k,...N}),_()},E=()=>{Qy(w,{throttleTime:u,batchSize:d}),f=Ky(P),dA()},S=()=>{qy(),f==null||f(),fA(P);const k=Fe.requestsQueue.splice(0);w(k,{isBeacon:!0})},b=()=>{typeof window>"u"||(document.visibilityState==="hidden"?S():document.visibilityState==="visible"&&E())},R=()=>{qy(),f==null||f(),typeof window<"u"&&window.removeEventListener("visibilitychange",b)};return _(),f=Ky(P),cA(P),typeof window<"u"&&window.addEventListener("visibilitychange",b),{track:P,cleanup:R}};function qy(){Fe.isProcessing=!1}async function Qy(t,e){if(Fe.isProcessing)return;Fe.isProcessing=!0;const{throttleTime:n=1e3,batchSize:s=30}=e??{};for(;Fe.isProcessing&&Fe.requestsQueue.length>0;){const o=Fe.requestsQueue.splice(0,s);o.length&&await t(o),await new Promise(l=>setTimeout(l,n))}Fe.isProcessing=!1}function Ky(t){var e;if(Fe.isHeartBeatProcessing||((e=Fe.config.heartBeatInterval)!==null&&e!==void 0?e:0)<10)return()=>{};Fe.isHeartBeatProcessing=!0;const n=setInterval(()=>{t({eventName:sA})},Fe.config.heartBeatInterval);return()=>{clearInterval(n),Fe.isHeartBeatProcessing=!1}}function cA(t){typeof window>"u"||Fe.wasInitializationTracked||(Fe.wasInitializationTracked=!0,t({eventName:iA,properties:{referrer:document==null?void 0:document.referrer}}))}function dA(){typeof window>"u"||Fe.sessionStartTime!==null||(Fe.sessionStartTime=new Date().toISOString())}function fA(t){if(typeof window>"u"||Fe.sessionStartTime===null)return;const e=new Date().getTime()-new Date(Fe.sessionStartTime).getTime();Fe.sessionStartTime=null,t({eventName:oA,properties:{sessionDuration:e}})}function hA(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function pA(t){return e=>({event_name:e.eventName,properties:e.properties,timestamp:e.timestamp,page_url:e.pageUrl,...t})}let wd=null;async function mA(t){if(!Fe.sessionContext){if(!wd){const e=ah();wd=t.me().then(n=>({user_id:n.id,session_id:e})).catch(()=>({user_id:null,session_id:e}))}Fe.sessionContext=await wd}return Fe.sessionContext}function gA(){if(typeof window>"u"||!window.location)return;const e=new URLSearchParams(window.location.search).get(Wy);if(e==null||!e.length)return;const n=new URLSearchParams(window.location.search);n.delete(Wy);const s=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",s),{enabled:e==="true"}}function ah(){if(typeof window>"u")return vd();try{const t=localStorage.getItem(Hy);if(!t){const e=vd();return localStorage.setItem(Hy,e),e}return t}catch{return vd()}}class yA extends Error{constructor(e,n,s,o,l){super(e),this.name="Base44Error",this.status=n,this.code=s,this.data=o,this.originalError=l}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function _o({baseURL:t,headers:e={},token:n,interceptResponses:s=!0,onError:o}){const l=et.create({baseURL:t,headers:{"Content-Type":"application/json",Accept:"application/json",...e}});return n&&(l.defaults.headers.common.Authorization=`Bearer ${n}`),l.interceptors.request.use(u=>{typeof window<"u"&&window.location&&(u.headers.set("X-Origin-URL",window.location.href),u.headers.get("Authorization")||u.headers.set("X-Base44-Anonymous-Id",ah()));const d=nA();if(u.requestId=d,By)try{window.parent.postMessage({type:"api-request-start",requestId:d,data:{url:t+u.url,method:u.method,body:u.data instanceof FormData?"[FormData object]":u.data}},"*")}catch{}return u}),s&&l.interceptors.response.use(u=>{var d;const f=(d=u.config)===null||d===void 0?void 0:d.requestId;try{By&&f&&window.parent.postMessage({type:"api-request-end",requestId:f,data:{statusCode:u.status,response:u.data}},"*")}catch{}return u.data},u=>{var d,f,p,g,y,w,_,P;const E=((f=(d=u.response)===null||d===void 0?void 0:d.data)===null||f===void 0?void 0:f.message)||((g=(p=u.response)===null||p===void 0?void 0:p.data)===null||g===void 0?void 0:g.detail)||u.message,S=new yA(E,(y=u.response)===null||y===void 0?void 0:y.status,(_=(w=u.response)===null||w===void 0?void 0:w.data)===null||_===void 0?void 0:_.code,(P=u.response)===null||P===void 0?void 0:P.data,u);return o==null||o(S),Promise.reject(S)}),l}function Gy(t){const{axios:e,appId:n,getSocket:s}=t;return new Proxy({},{get(o,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return xA(e,n,l,s)}})}function vA(t){var e;try{const n=JSON.parse(t);return{type:n.type,data:n.data,id:n.id||((e=n.data)===null||e===void 0?void 0:e.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}function xA(t,e,n,s){const o=`/apps/${e}/entities/${n}`;return{async list(l,u,d,f){const p={};return l&&(p.sort=l),u&&(p.limit=u),d&&(p.skip=d),f&&(p.fields=Array.isArray(f)?f.join(","):f),t.get(o,{params:p})},async filter(l,u,d,f,p){const g={q:JSON.stringify(l)};return u&&(g.sort=u),d&&(g.limit=d),f&&(g.skip=f),p&&(g.fields=Array.isArray(p)?p.join(","):p),t.get(o,{params:g})},async get(l){return t.get(`${o}/${l}`)},async create(l){return t.post(o,l)},async update(l,u){return t.put(`${o}/${l}`,u)},async delete(l){return t.delete(`${o}/${l}`)},async deleteMany(l){return t.delete(o,{data:l})},async bulkCreate(l){return t.post(`${o}/bulk`,l)},async updateMany(l,u){return t.patch(`${o}/update-many`,{query:l,data:u})},async bulkUpdate(l){return t.put(`${o}/bulk`,l)},async importEntities(l){const u=new FormData;return u.append("file",l,l.name),t.post(`${o}/import`,u,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(l){const u=`entities:${e}:${n}`;return s().subscribeToRoom(u,{update_model:p=>{var g;const y=vA(p.data);if(y){y.type!=="delete"&&(!((g=y.data)===null||g===void 0)&&g._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${y.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${y.id}")\` to fetch the full record.`);try{l(y)}catch(w){console.error("[Base44 SDK] Subscription callback error:",w)}}}})}}}function wA(t,e){return{async call(n,s,o){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(s!=null&&s.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:l,queryParams:u,...d}=o??{},f={...d,...l&&{path_params:l},...u&&{query_params:u}};return await t.post(`/apps/${e}/integrations/custom/${n}/${s}`,f)}}}function Xy(t,e){const n=wA(t,e);return new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return o==="custom"?n:new Proxy({},{get(l,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return async d=>{if(typeof d=="string")throw new Error(`Integration ${u} must receive an object with named parameters, received: ${d}`);let f,p;return d instanceof FormData||d&&Object.values(d).some(g=>g instanceof File)?(f=new FormData,Object.keys(d).forEach(g=>{d[g]instanceof File?f.append(g,d[g],d[g].name):typeof d[g]=="object"&&d[g]!==null?f.append(g,JSON.stringify(d[g])):f.append(g,d[g])}),p="multipart/form-data"):(f=d,p="application/json"),o==="Core"?t.post(`/apps/${e}/integration-endpoints/Core/${u}`,f||d,{headers:{"Content-Type":p}}):t.post(`/apps/${e}/integration-endpoints/installable/${o}/integration-endpoints/${u}`,f||d,{headers:{"Content-Type":p}})}}})}})}function SA(){return typeof window>"u"?!1:window!==window.parent}function bA(t,e,n){const l=Math.round(window.screenX+(window.outerWidth-500)/2),u=Math.round(window.screenY+(window.outerHeight-600)/2),d=window.open(t,"base44_auth",`width=500,height=600,left=${l},top=${u},resizable=yes,scrollbars=yes`);if(!d)return;const f=()=>{window.removeEventListener("message",p),clearInterval(g),d.closed||d.close()},p=y=>{var w;if(y.origin!==n||y.source!==d||!(!((w=y.data)===null||w===void 0)&&w.access_token))return;f();const _=new URL(e),{access_token:P,is_new_user:E}=y.data;_.searchParams.set("access_token",P),E!=null&&_.searchParams.set("is_new_user",String(E)),window.location.href=_.toString()},g=setInterval(()=>{d.closed&&f()},500);window.addEventListener("message",p)}function EA(t,e,n,s){return{async me(){return t.get(`/apps/${n}/entities/User/me`)},async updateMe(o){return t.put(`/apps/${n}/entities/User/me`,o)},redirectToLogin(o){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const l=o?new URL(o,window.location.origin).toString():window.location.href,u=`${s.appBaseUrl}/login?from_url=${encodeURIComponent(l)}`;window.location.href=u},loginWithProvider(o,l="/"){const u=new URL(l,window.location.origin).toString(),d=`app_id=${n}&from_url=${encodeURIComponent(u)}`;let f;o==="sso"?f=`/apps/${n}/auth/sso/login`:f=`/apps/auth${o==="google"?"":`/${o}`}/login`;const p=`${s.appBaseUrl}/api${f}?${d}`;if(SA()){const g=`${p}&popup_origin=${encodeURIComponent(window.location.origin)}`;return bA(g,u,window.location.origin)}window.location.href=p},logout(o){if(delete t.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(d){console.error("Failed to remove token from localStorage:",d)}const l=o||window.location.href,u=`${s.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(l)}`;window.location.href=u}},setToken(o,l=!0){if(o&&(t.defaults.headers.common.Authorization=`Bearer ${o}`,e.defaults.headers.common.Authorization=`Bearer ${o}`,l&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",o),window.localStorage.setItem("token",o)}catch(u){console.error("Failed to save token to localStorage:",u)}},async loginViaEmailPassword(o,l,u){var d;try{const f=await t.post(`/apps/${n}/auth/login`,{email:o,password:l,...u&&{turnstile_token:u}}),{access_token:p,user:g}=f;return p&&this.setToken(p),{access_token:p,user:g}}catch(f){throw((d=f.response)===null||d===void 0?void 0:d.status)===401&&await this.logout(),f}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(o,l){return t.post(`/apps/${n}/users/invite-user`,{user_email:o,role:l})},register(o){return t.post(`/apps/${n}/auth/register`,o)},verifyOtp({email:o,otpCode:l}){return t.post(`/apps/${n}/auth/verify-otp`,{email:o,otp_code:l})},resendOtp(o){return t.post(`/apps/${n}/auth/resend-otp`,{email:o})},resetPasswordRequest(o){return t.post(`/apps/${n}/auth/reset-password-request`,{email:o})},resetPassword({resetToken:o,newPassword:l}){return t.post(`/apps/${n}/auth/reset-password`,{reset_token:o,new_password:l})},changePassword({userId:o,currentPassword:l,newPassword:u}){return t.post(`/apps/${n}/auth/change-password`,{user_id:o,current_password:l,new_password:u})}}}function _A(t,e){return{async getAccessToken(n){const s=`/apps/${e}/auth/sso/accesstoken/${n}`;return t.get(s)},async getIdToken(n){const s=`/apps/${e}/auth/sso/idtoken/${n}`;return t.get(s)}}}function CA(t,e){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await t.get(`/apps/${e}/external-auth/tokens/${n}`)).access_token},async getConnection(n){var s;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const l=await t.get(`/apps/${e}/external-auth/tokens/${n}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getWorkspaceConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const l=await t.get(`/apps/${e}/external-auth/tokens/connectors/${n}`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await t.get(`/apps/${e}/app-user-auth/connectors/${n}/token`)).access_token},async getCurrentAppUserConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const l=await t.get(`/apps/${e}/app-user-auth/connectors/${n}/token`);return{accessToken:l.access_token,connectionConfig:(s=l.connection_config)!==null&&s!==void 0?s:null}}}}function TA(t,e){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await t.post(`/apps/${e}/app-user-auth/connectors/${n}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await t.delete(`/apps/${e}/app-user-auth/connectors/${n}`)}}}function Es(t={}){const{storageKey:e="base44_access_token",paramName:n="access_token",saveToStorage:s=!0,removeFromUrl:o=!0}=t;let l=null;if(typeof window<"u"&&window.location)try{const u=new URLSearchParams(window.location.search);if(l=u.get(n),l){if(s&&kA(l,{storageKey:e}),o){u.delete(n);const d=`${window.location.pathname}${u.toString()?`?${u.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}return l}}catch(u){console.error("Error retrieving token from URL:",u)}if(typeof window<"u"&&window.localStorage)try{return l=window.localStorage.getItem(e),l}catch(u){console.error("Error retrieving token from local storage:",u)}return null}function kA(t,e){const{storageKey:n="base44_access_token"}=e;if(typeof window>"u"||!window.localStorage||!t)return!1;try{return window.localStorage.setItem(n,t),window.localStorage.setItem("token",t),!0}catch(s){return console.error("Error saving token to local storage:",s),!1}}function Yy(t,e,n){const s=(l,u)=>l?`${String(l).replace(/\/$/,"")}${u}`:u,o=l=>{const u=new Headers;if(n!=null&&n.getAuthHeaders){const d=n.getAuthHeaders();Object.entries(d).forEach(([f,p])=>{p!=null&&u.set(f,String(p))})}return l&&new Headers(l).forEach((d,f)=>{u.set(f,d)}),u};return{async invoke(l,u){if(typeof u=="string")throw new Error(`Function ${l} must receive an object with named parameters, received: ${u}`);let d,f;return u instanceof FormData||u&&Object.values(u).some(p=>p instanceof File)?(d=new FormData,Object.keys(u).forEach(p=>{u[p]instanceof File?d.append(p,u[p],u[p].name):typeof u[p]=="object"&&u[p]!==null?d.append(p,JSON.stringify(u[p])):d.append(p,u[p])}),f="multipart/form-data"):(d=u,f="application/json"),t.post(`/apps/${e}/functions/${l}`,d||u,{headers:{"Content-Type":f}})},async fetch(l,u={}){const f=`/functions${l.startsWith("/")?l:`/${l}`}`,p=o(u.headers),g={...u,headers:p};return await fetch(s(n==null?void 0:n.baseURL,f),g)}}}function Jy({axios:t,getSocket:e,appId:n,serverUrl:s,token:o}){const l=`/apps/${n}/agents`,u={},d=()=>t.get(`${l}/conversations`),f=E=>t.get(`${l}/conversations/${E}`);return{getConversations:d,getConversation:f,listConversations:E=>t.get(`${l}/conversations`,{params:E}),createConversation:E=>t.post(`${l}/conversations`,E),addMessage:async(E,S)=>t.post(`${l}/conversations/v2/${E.id}/messages`,S),subscribeToConversation:(E,S)=>{const b=`/agent-conversations/${E}`,R=e(),k=f(E).then(N=>(u[E]=N,N));return R.subscribeToRoom(b,{connect:()=>{},update_model:async({data:N})=>{const F=JSON.parse(N);if(F._message){await k;const U=F._message,q=u[E];if(q){const z=q.messages||[],Y=z.findIndex(ve=>ve.id===U.id),ne=Y!==-1?z.map((ve,Te)=>Te===Y?U:ve):[...z,U];u[E]={...q,messages:ne},S==null||S(u[E])}}}})},getWhatsAppConnectURL:E=>{const S=`${s}/api/apps/${n}/agents/${encodeURIComponent(E)}/whatsapp`,b=o??Es();return b?`${S}?token=${b}`:S},getTelegramConnectURL:E=>{const S=`${s}/api/apps/${n}/agents/${encodeURIComponent(E)}/telegram`,b=o??Es();return b?`${S}?token=${b}`:S}}}function Zy({serverUrl:t,token:e,appId:n}){return{connection:()=>{var o;return{baseURL:`${t}/api/apps/${n}/ai/openai/v1`,token:(o=e??Es())!==null&&o!==void 0?o:""}}}}function ev(t,e){const n=`/app-logs/${e}`;return{async logUserInApp(s){await t.post(`${n}/log-user-in-app/${s}`)},async fetchLogs(s={}){return await t.get(n,{params:s})},async getStats(s={}){return await t.get(`${n}/stats`,{params:s})}}}function PA(t,e){return{async inviteUser(n,s){if(s!=="user"&&s!=="admin")throw new Error(`Invalid role: "${s}". Role must be either "user" or "admin".`);return await t.post(`/apps/${e}/runtime/users/invite-user`,{user_email:n,role:s})}}}const Mn=Object.create(null);Mn.open="0";Mn.close="1";Mn.ping="2";Mn.pong="3";Mn.message="4";Mn.upgrade="5";Mn.noop="6";const Ll=Object.create(null);Object.keys(Mn).forEach(t=>{Ll[Mn[t]]=t});const pf={type:"error",data:"parser error"},Aw=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Nw=typeof ArrayBuffer=="function",Ow=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,lh=({type:t,data:e},n,s)=>Aw&&e instanceof Blob?n?s(e):tv(e,s):Nw&&(e instanceof ArrayBuffer||Ow(e))?n?s(e):tv(new Blob([e]),s):s(Mn[t]+(e||"")),tv=(t,e)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];e("b"+(s||""))},n.readAsDataURL(t)};function nv(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Sd;function RA(t,e){if(Aw&&t.data instanceof Blob)return t.data.arrayBuffer().then(nv).then(e);if(Nw&&(t.data instanceof ArrayBuffer||Ow(t.data)))return e(nv(t.data));lh(t,!1,n=>{Sd||(Sd=new TextEncoder),e(Sd.encode(n))})}const rv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Co=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,n=t.length,s,o=0,l,u,d,f;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const p=new ArrayBuffer(e),g=new Uint8Array(p);for(s=0;s>4,g[o++]=(u&15)<<4|d>>2,g[o++]=(d&3)<<6|f&63;return p},NA=typeof ArrayBuffer=="function",uh=(t,e)=>{if(typeof t!="string")return{type:"message",data:Dw(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:OA(t.substring(1),e)}:Ll[n]?t.length>1?{type:Ll[n],data:t.substring(1)}:{type:Ll[n]}:pf},OA=(t,e)=>{if(NA){const n=AA(t);return Dw(n,e)}else return{base64:!0,data:t}},Dw=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},jw="",DA=(t,e)=>{const n=t.length,s=new Array(n);let o=0;t.forEach((l,u)=>{lh(l,!1,d=>{s[u]=d,++o===n&&e(s.join(jw))})})},jA=(t,e)=>{const n=t.split(jw),s=[];for(let o=0;o{const s=n.length;let o;if(s<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,s);else if(s<65536){o=new Uint8Array(3);const l=new DataView(o.buffer);l.setUint8(0,126),l.setUint16(1,s)}else{o=new Uint8Array(9);const l=new DataView(o.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(s))}t.data&&typeof t.data!="string"&&(o[0]|=128),e.enqueue(o),e.enqueue(n)})}})}let bd;function _l(t){return t.reduce((e,n)=>e+n.length,0)}function Cl(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let s=0;for(let o=0;oMath.pow(2,21)-1){d.enqueue(pf);break}o=g*Math.pow(2,32)+p.getUint32(4),s=3}else{if(_l(n)t){d.enqueue(pf);break}}}})}const Lw=4;function rt(t){if(t)return IA(t)}function IA(t){for(var e in rt.prototype)t[e]=rt.prototype[e];return t}rt.prototype.on=rt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};rt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};rt.prototype.off=rt.prototype.removeListener=rt.prototype.removeAllListeners=rt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var s,o=0;oPromise.resolve().then(e):(e,n)=>n(e,0),un=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),FA="arraybuffer";function Mw(t,...e){return e.reduce((n,s)=>(t.hasOwnProperty(s)&&(n[s]=t[s]),n),{})}const zA=un.setTimeout,VA=un.clearTimeout;function uu(t,e){e.useNativeTimers?(t.setTimeoutFn=zA.bind(un),t.clearTimeoutFn=VA.bind(un)):(t.setTimeoutFn=un.setTimeout.bind(un),t.clearTimeoutFn=un.clearTimeout.bind(un))}const UA=1.33;function BA(t){return typeof t=="string"?$A(t):Math.ceil((t.byteLength||t.size)*UA)}function $A(t){let e=0,n=0;for(let s=0,o=t.length;s=57344?n+=3:(s++,n+=4);return n}function Iw(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function WA(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function HA(t){let e={},n=t.split("&");for(let s=0,o=n.length;s{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};jA(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,DA(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Iw()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}let Fw=!1;try{Fw=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const KA=Fw;function GA(){}class XA extends QA{constructor(e){if(super(e),typeof location<"u"){const n=location.protocol==="https:";let s=location.port;s||(s=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,n){const s=this.request({method:"POST",data:e});s.on("success",n),s.on("error",(o,l)=>{this.onError("xhr post error",o,l)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=e}}class Dn extends rt{constructor(e,n,s){super(),this.createRequest=e,uu(this,s),this._opts=s,this._method=s.method||"GET",this._uri=n,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;const n=Mw(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(n);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&s.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var o;s.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=Dn.requestsCount++,Dn.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=GA,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Dn.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Dn.requestsCount=0;Dn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",sv);else if(typeof addEventListener=="function"){const t="onpagehide"in un?"pagehide":"unload";addEventListener(t,sv,!1)}}function sv(){for(let t in Dn.requests)Dn.requests.hasOwnProperty(t)&&Dn.requests[t].abort()}const YA=(function(){const t=zw({xdomain:!1});return t&&t.responseType!==null})();class JA extends XA{constructor(e){super(e);const n=e&&e.forceBase64;this.supportsBinary=YA&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Dn(zw,this.uri(),e)}}function zw(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||KA))return new XMLHttpRequest}catch{}if(!e)try{return new un[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Vw=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ZA extends ch{get name(){return"websocket"}doOpen(){const e=this.uri(),n=this.opts.protocols,s=Vw?{}:Mw(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,s)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n{try{this.doWrite(s,l)}catch{}o&&lu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Iw()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}}const Ed=un.WebSocket||un.MozWebSocket;class eN extends ZA{createSocket(e,n,s){return Vw?new Ed(e,n,s):n?new Ed(e,n):new Ed(e)}doWrite(e,n){this.ws.send(n)}}class tN extends ch{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const n=MA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(n).getReader(),o=LA();o.readable.pipeTo(e.writable),this._writer=o.writable.getWriter();const l=()=>{s.read().then(({done:d,value:f})=>{d||(this.onPacket(f),l())}).catch(d=>{})};l();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n{o&&lu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const nN={websocket:eN,webtransport:tN,polling:JA},rN=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,sN=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mf(t){if(t.length>8e3)throw"URI too long";const e=t,n=t.indexOf("["),s=t.indexOf("]");n!=-1&&s!=-1&&(t=t.substring(0,n)+t.substring(n,s).replace(/:/g,";")+t.substring(s,t.length));let o=rN.exec(t||""),l={},u=14;for(;u--;)l[sN[u]]=o[u]||"";return n!=-1&&s!=-1&&(l.source=e,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=iN(l,l.path),l.queryKey=oN(l,l.query),l}function iN(t,e){const n=/\/{2,9}/g,s=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function oN(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,o,l){o&&(n[o]=l)}),n}const gf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ml=[];gf&&addEventListener("offline",()=>{Ml.forEach(t=>t())},!1);class Fr extends rt{constructor(e,n){if(super(),this.binaryType=FA,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){const s=mf(e);n.hostname=s.host,n.secure=s.protocol==="https"||s.protocol==="wss",n.port=s.port,s.query&&(n.query=s.query)}else n.host&&(n.hostname=mf(n.host).host);uu(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(s=>{const o=s.prototype.name;this.transports.push(o),this._transportsByName[o]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=HA(this.opts.query)),gf&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ml.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=Lw,n.transport=e,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Fr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Fr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let s=0;s0&&n>this._maxPayload)return this.writeBuffer.slice(0,s);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,lu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,s){return this._sendPacket("message",e,n,s),this}send(e,n,s){return this._sendPacket("message",e,n,s),this}_sendPacket(e,n,s,o){if(typeof n=="function"&&(o=n,n=void 0),typeof s=="function"&&(o=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const l={type:e,data:n,options:s};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(Fr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),gf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Ml.indexOf(this._offlineEventListener);s!==-1&&Ml.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}}Fr.protocol=Lw;class aN extends Fr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!s)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Fr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(g(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=n.name,this.emitReserved("upgradeError",w)}}))};function l(){s||(s=!0,g(),n.close(),n=null)}const u=y=>{const w=new Error("probe error: "+y);w.transport=n.name,l(),this.emitReserved("upgradeError",w)};function d(){u("transport closed")}function f(){u("socket closed")}function p(y){n&&y.name!==n.name&&l()}const g=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",d),this.off("close",f),this.off("upgrading",p)};n.once("open",o),n.once("error",u),n.once("close",d),this.once("close",f),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const n=[];for(let s=0;snN[l]).filter(l=>!!l)),super(s?o:e,o)}};function uN(t,e="",n){let s=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),s=mf(t)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const l=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+l+":"+s.port+e,s.href=s.protocol+"://"+l+(n&&n.port===s.port?"":":"+s.port),s}const cN=typeof ArrayBuffer=="function",dN=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Uw=Object.prototype.toString,fN=typeof Blob=="function"||typeof Blob<"u"&&Uw.call(Blob)==="[object BlobConstructor]",hN=typeof File=="function"||typeof File<"u"&&Uw.call(File)==="[object FileConstructor]";function dh(t){return cN&&(t instanceof ArrayBuffer||dN(t))||fN&&t instanceof Blob||hN&&t instanceof File}function Il(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,s=t.length;n=0&&t.numthis.opts.maxAttachments)throw new Error("too many attachments");s.attachments=d}if(e.charAt(n+1)==="/"){const l=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););s.nsp=e.substring(l,n)}else s.nsp="/";const o=e.charAt(n+1);if(o!==""&&Number(o)==o){const l=n+1;for(;++n;){const u=e.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===e.length)break}s.id=Number(e.substring(l,n+1))}if(e.charAt(++n)){const l=this.tryParse(e.substr(n));if(fh.isPayloadValid(s.type,l))s.data=l;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case Oe.CONNECT:return iv(n);case Oe.DISCONNECT:return n===void 0;case Oe.CONNECT_ERROR:return typeof n=="string"||iv(n);case Oe.EVENT:case Oe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&gN.indexOf(n[0])===-1);case Oe.ACK:case Oe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class vN{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=mN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const xN=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function iv(t){return Object.prototype.toString.call(t)==="[object Object]"}const wN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:fh,Encoder:yN,get PacketType(){return Oe}},Symbol.toStringTag,{value:"Module"}));function En(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const SN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Bw extends rt{constructor(e,n,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[En(e,"open",this.onopen.bind(this)),En(e,"packet",this.onpacket.bind(this)),En(e,"error",this.onerror.bind(this)),En(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var s,o,l;if(SN.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:Oe.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const g=this.ids++,y=n.pop();this._registerAckCallback(g,y),u.id=g}const d=(o=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((l=this.io.engine)===null||l===void 0)&&l._hasPingExpired());return this.flags.volatile&&!d||(f?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(e,n){var s;const o=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(o===void 0){this.acks[e]=n;return}const l=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let d=0;d{this.io.clearTimeoutFn(l),n.apply(this,d)};u.withError=!0,this.acks[e]=u}emitWithAck(e,...n){return new Promise((s,o)=>{const l=(u,d)=>u?o(u):s(d);l.withError=!0,n.push(l),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...l)=>(this._queue[0],o!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...l)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Oe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){const s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Oe.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Oe.EVENT:case Oe.BINARY_EVENT:this.onevent(e);break;case Oe.ACK:case Oe.BINARY_ACK:this.onack(e);break;case Oe.DISCONNECT:this.ondisconnect();break;case Oe.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let s=!1;return function(...o){s||(s=!0,n.packet({type:Oe.ACK,id:e,data:o}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Oe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let s=0;s0&&t.jitter<=1?t.jitter:0,this.attempts=0}Ri.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};Ri.prototype.reset=function(){this.attempts=0};Ri.prototype.setMin=function(t){this.ms=t};Ri.prototype.setMax=function(t){this.max=t};Ri.prototype.setJitter=function(t){this.jitter=t};class xf extends rt{constructor(e,n){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,uu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Ri({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const o=n.parser||wN;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new lN(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const o=En(n,"open",function(){s.onopen(),e&&e()}),l=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),e?e(d):this.maybeReconnectOnOpen()},u=En(n,"error",l);if(this._timeout!==!1){const d=this._timeout,f=this.setTimeoutFn(()=>{o(),l(new Error("timeout")),n.close()},d);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(o),this.subs.push(u),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(En(e,"ping",this.onping.bind(this)),En(e,"data",this.ondata.bind(this)),En(e,"error",this.onerror.bind(this)),En(e,"close",this.onclose.bind(this)),En(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){lu(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new Bw(this,e,n),this.nsps[e]=s),s}_destroy(e){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let s=0;se()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const So={};function Fl(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=uN(t,e.path||"/socket.io"),s=n.source,o=n.id,l=n.path,u=So[o]&&l in So[o].nsps,d=e.forceNew||e["force new connection"]||e.multiplex===!1||u;let f;return d?f=new xf(s,e):(So[o]||(So[o]=new xf(s,e)),f=So[o]),n.query&&!e.query&&(e.query=n.queryKey),f.socket(n.path,e)}Object.assign(Fl,{Manager:xf,Socket:Bw,io:Fl,connect:Fl});const bN=250;function ov(t,e){var n;const s=(n=t.token)!==null&&n!==void 0?n:Es(),o={app_id:t.appId,token:s};s||(o.anonymous_id=ah());const l=Fl(t.serverUrl,{path:t.mountPath,transports:t.transports,query:o});return l.on("connect",async()=>{var u;return console.log("connect",l.id),(u=e.connect)===null||u===void 0?void 0:u.call(e)}),l.on("update_model",async u=>{var d;return(d=e.update_model)===null||d===void 0?void 0:d.call(e,u)}),l.on("error",async u=>{var d;return(d=e.error)===null||d===void 0?void 0:d.call(e,u)}),l.on("connect_error",async u=>{var d;return console.error("connect_error",u),(d=e.error)===null||d===void 0?void 0:d.call(e,u)}),l}function EN({config:t}){let e={...t};const n={},s={},o={connect:async()=>{const b=[];Object.keys(n).forEach(R=>{const k=w(R);k.length!==0&&(p(R),k.forEach(({connect:N})=>{const F=async()=>N==null?void 0:N();b.push(F())}))}),await Promise.all(b)},update_model:async b=>{const k=w(b.room).map(N=>{var F;return(F=N.update_model)===null||F===void 0?void 0:F.call(N,b)});await Promise.all(k)},error:async b=>{console.error("error",b);const R=Object.values(n).flat().map(k=>{var N;return(N=k.error)===null||N===void 0?void 0:N.call(k,b)});await Promise.all(R)}};let l=ov(t,o);function u(){d()}function d(){P(),l&&l.disconnect()}function f(b){u(),e={...e,...b},l=ov(e,o)}function p(b){l.emit("join",b)}function g(b){l.emit("leave",b)}async function y(b,R){var k;const N=JSON.stringify(R);return(k=o.update_model)===null||k===void 0?void 0:k.call(o,{room:b,data:N})}function w(b){var R;return(R=n[b])!==null&&R!==void 0?R:[]}function _(b){const R=s[b];R&&(clearTimeout(R),delete s[b])}function P(){Object.keys(s).forEach(b=>{var R,k;clearTimeout(s[b]),delete s[b],((k=(R=n[b])===null||R===void 0?void 0:R.length)!==null&&k!==void 0?k:0)===0&&delete n[b]})}function E(b){_(b),s[b]=setTimeout(()=>{var R,k;delete s[b],!(((k=(R=n[b])===null||R===void 0?void 0:R.length)!==null&&k!==void 0?k:0)>0)&&(g(b),delete n[b])},bN)}return{socket:l,subscribeToRoom:(b,R)=>{n[b]?_(b):(p(b),n[b]=[]),n[b].push(R);let k=!1;return()=>{var N,F;k||(k=!0,n[b]=(F=(N=n[b])===null||N===void 0?void 0:N.filter(U=>U!==R))!==null&&F!==void 0?F:[],n[b].length===0&&E(b))}},updateConfig:f,updateModel:y,disconnect:d}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var $w=class extends Event{constructor(e,n){super("error",n);Le(this,"message");Le(this,"error");this.message=e.message,this.error=e}},Ww=class extends Event{constructor(e=1e3,n="",s){super("close",s);Le(this,"code");Le(this,"reason");Le(this,"wasClean",!0);this.code=e,this.reason=n}},_d={Event,ErrorEvent:$w,CloseEvent:Ww};function _N(t,e){if(!t)throw new Error(e)}function CN(t){return new t.constructor(t.type,t)}function TN(t){return"data"in t?new MessageEvent(t.type,t):"code"in t||"reason"in t?new Ww(t.code||1999,t.reason||"unknown reason",t):"error"in t?new $w(t.error,t):new Event(t.type,t)}var F0,kN=typeof process<"u"&&typeof((F0=process.versions)==null?void 0:F0.node)<"u"&&typeof document>"u",Tl=kN?TN:CN,ss={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},av=!1,PN=class os extends EventTarget{constructor(n,s,o={}){super();Le(this,"_ws");Le(this,"_retryCount",-1);Le(this,"_uptimeTimeout");Le(this,"_connectTimeout");Le(this,"_shouldReconnect",!0);Le(this,"_connectLock",!1);Le(this,"_binaryType","blob");Le(this,"_closeCalled",!1);Le(this,"_messageQueue",[]);Le(this,"_url");Le(this,"_protocols");Le(this,"_options");Le(this,"onclose",null);Le(this,"onerror",null);Le(this,"onmessage",null);Le(this,"onopen",null);Le(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:s=ss.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),s),_N(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(o=>{var l;return(l=this._ws)==null?void 0:l.send(o)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(Tl(n))});Le(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(Tl(n))});Le(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(Tl(n)),this._connect()});Le(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(Tl(n))});this._url=n,this._protocols=s,this._options=o,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return os.CONNECTING}get OPEN(){return os.OPEN}get CLOSING(){return os.CLOSING}get CLOSED(){return os.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((s,o)=>(typeof o=="string"?s+=o.length:o instanceof Blob?s+=o.size:s+=o.byteLength,s),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?os.CLOSED:os.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,s){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,s)}reconnect(n,s){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,s),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:s=ss.maxEnqueuedMessages}=this._options;this._messageQueue.length",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=ss.reconnectionDelayGrowFactor,minReconnectionDelay:s=ss.minReconnectionDelay,maxReconnectionDelay:o=ss.maxReconnectionDelay}=this._options;let l=0;return this._retryCount>0&&(l=s*Math.pow(n,this._retryCount-1),l>o&&(l=o)),this._debug("next delay",l),l}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const s=n();if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(s.then)return s}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const s=n();if(typeof s=="string")return Promise.resolve(s);if(s.then)return s}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:n=ss.maxRetries,connectionTimeout:s=ss.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([o,l])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!av&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),av=!0);const u=this._options.WebSocket||WebSocket;this._debug("connect",{url:o,protocols:l}),this._ws=l?new u(o,l):new u(o),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),s)}).catch(o=>{this._connectLock=!1,this._handleError(new _d.ErrorEvent(Error(o.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new _d.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,s){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,s),this._handleClose(new _d.CloseEvent(n,s,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var RN=t=>t[1]!==null&&t[1]!==void 0;function AN(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let t=new Date().getTime(),e=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let s=Math.random()*16;return t>0?(s=(t+s)%16|0,t=Math.floor(t/16)):(s=(e+s)%16|0,e=Math.floor(e/16)),(n==="x"?s:s&3|8).toString(16)})}function Hw(t,e,n={}){const{host:s,path:o,protocol:l,room:u,party:d,query:f}=t;let p=s.replace(/^(http|https|ws|wss):\/\//,"");if(p.endsWith("/")&&(p=p.slice(0,-1)),o&&o.startsWith("/"))throw new Error("path must not start with a slash");const g=d??"main",y=o?`/${o}`:"",w=l||(p.startsWith("localhost:")||p.startsWith("127.0.0.1:")||p.startsWith("192.168.")||p.startsWith("10.")||p.startsWith("172.")&&p.split(".")[1]>="16"&&p.split(".")[1]<="31"||p.startsWith("[::ffff:7f00:1]:")?e:e+"s"),_=`${w}://${p}/${d?`parties/${d}`:"party"}/${u}${y}`,P=(S={})=>`${_}?${new URLSearchParams([...Object.entries(n),...Object.entries(S).filter(RN)])}`,E=typeof f=="function"?async()=>P(await f()):P(f);return{host:p,path:y,room:u,name:g,protocol:w,partyUrl:_,urlProvider:E}}var NN=class extends PN{constructor(e){const n=lv(e);super(n.urlProvider,n.protocols,n.socketOptions);Le(this,"_pk");Le(this,"_pkurl");Le(this,"name");Le(this,"room");Le(this,"host");Le(this,"path");this.partySocketOptions=e,this.setWSProperties(n)}updateProperties(e){const n=lv({...e,host:e.host??this.host,room:e.room??this.room,path:e.path??this.path});this._url=n.urlProvider,this._protocols=n.protocols,this._options=n.socketOptions,this.setWSProperties(n)}setWSProperties(e){const{_pk:n,_pkurl:s,name:o,room:l,host:u,path:d}=e;this._pk=n,this._pkurl=s,this.name=o,this.room=l,this.host=u,this.path=d}reconnect(e,n){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(e,n)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(e,n){const s=Hw(e,"http"),o=typeof s.urlProvider=="string"?s.urlProvider:await s.urlProvider();return(e.fetch??fetch)(o,n)}};function lv(t){const{id:e,host:n,path:s,party:o,room:l,protocol:u,query:d,protocols:f,...p}=t,g=e||AN(),y=Hw(t,"ws",{_pk:g});return{_pk:g,_pkurl:y.partyUrl,name:y.name,room:y.room,host:y.host,path:y.path,protocols:f,socketOptions:p,urlProvider:y.urlProvider}}const ON=1e3,DN=3e3;class jN{constructor(e,n,s,o,l){var u;this.onClose=l,this.listeners=new Set,this.heartbeat=null,this.id=(u=o==null?void 0:o.id)!==null&&u!==void 0?u:crypto.randomUUID();const d=new NN({host:s.host,party:e,room:n,id:this.id,query:()=>{const g=s.getAuthToken();return{app_id:s.appId,handler:e,...g?{token:g}:{},...s.functionsVersion?{fv:s.functionsVersion}:{}}}});this.ws=d;let f=Date.now();const p=()=>{f=Date.now()};d.addEventListener("open",p),d.addEventListener("message",g=>{p();let y;try{y=JSON.parse(g.data)}catch{return}if((y&&typeof y=="object"?y.type:void 0)!=="__pong")for(const _ of this.listeners)_(y)}),this.heartbeat=setInterval(()=>{if(Date.now()-f>DN){p(),d.reconnect();return}try{d.send(JSON.stringify({type:"__ping"}))}catch{}},ON)}subscribe(e){return this.listeners.add(e),{unsubscribe:()=>{this.listeners.delete(e)}}}send(e){this.ws.send(JSON.stringify(e))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function LN(t,e,n,s){let o=null;return{connect(l){if(o)return o;const u=new jN(t,e,n,l,()=>{s.delete(u),o===u&&(o=null)});return o=u,s.add(u),u}}}function MN(t,e){return t&&!t.startsWith("/")?t:e??t}function IN(t){const e=new Set;return{module:new Proxy({},{get(s,o){if(!(typeof o!="string"||o==="then"))return l=>LN(o,l,t,e)}}),closeAll:()=>{for(const s of[...e])s.close()}}}function FN(t){var e,n,s;const{serverUrl:o="https://base44.app",appId:l,token:u,serviceToken:d,requiresAuth:f=!1,appBaseUrl:p,options:g,functionsVersion:y,headers:w}=t,_=typeof p=="string"?p:"",P={serverUrl:o,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:l,token:u};let E=null;const S=()=>(E||(E=EN({config:P})),E),b={...w,"X-App-Id":String(l)},R=y?{...b,"Base44-Functions-Version":y}:b,k=_o({baseURL:`${o}/api`,headers:b,token:u,onError:g==null?void 0:g.onError}),N=_o({baseURL:`${o}/api`,headers:R,token:u,interceptResponses:!1,onError:g==null?void 0:g.onError}),F={...b,...u?{"on-behalf-of":`Bearer ${u}`}:{}},U=_o({baseURL:`${o}/api`,headers:F,token:d,onError:g==null?void 0:g.onError}),q=_o({baseURL:`${o}/api`,headers:R,token:d,interceptResponses:!1}),z=EA(k,N,l,{appBaseUrl:_});if(typeof window<"u"){const Se=u||Es();Se&&z.setToken(Se)}const Y=IN({appId:l,host:MN(o,typeof window<"u"?(e=window.location)===null||e===void 0?void 0:e.origin:void 0),functionsVersion:y,getAuthToken:()=>u||Es()}),ne={entities:Gy({axios:k,appId:l,getSocket:S}),integrations:Xy(k,l),connectors:TA(k,l),auth:z,functions:Yy(N,l,{getAuthHeaders:()=>{const Se={},Z=u||Es();return Z&&(Se.Authorization=`Bearer ${Z}`),Se},baseURL:(n=N.defaults)===null||n===void 0?void 0:n.baseURL}),agents:Jy({axios:k,getSocket:S,appId:l,serverUrl:o,token:u}),aiGateway:Zy({serverUrl:o,token:u,appId:l}),appLogs:ev(k,l),users:PA(k,l),analytics:uA({axiosClient:k,serverUrl:o,appId:l,userAuthModule:z}),actors:Y.module,cleanup:()=>{ne.analytics.cleanup(),Y.closeAll(),E&&E.disconnect()}},ve={entities:Gy({axios:U,appId:l,getSocket:S}),integrations:Xy(U,l),sso:_A(U,l),connectors:CA(U,l),functions:Yy(q,l,{getAuthHeaders:()=>{const Se={};return d&&(Se.Authorization=`Bearer ${d}`),Se},baseURL:(s=q.defaults)===null||s===void 0?void 0:s.baseURL}),agents:Jy({axios:U,getSocket:S,appId:l,serverUrl:o,token:u}),aiGateway:Zy({serverUrl:o,token:d,appId:l}),appLogs:ev(U,l),cleanup:()=>{E&&E.disconnect()}};return f&&typeof window<"u"&&setTimeout(async()=>{try{await ne.auth.isAuthenticated()||ne.auth.redirectToLogin(window.location.href)}catch(Se){console.error("Authentication check failed:",Se),ne.auth.redirectToLogin(window.location.href)}},0),{...ne,setToken(Se){ne.auth.setToken(Se),E&&E.updateConfig({token:Se}),P.token=Se},getConfig(){return{serverUrl:o,appId:l,requiresAuth:f}},get asServiceRole(){if(!d)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return ve}}}const qw=typeof window>"u",zN=qw?{localStorage:new Map}:window,Oo=zN.localStorage,VN=t=>t.replace(/([A-Z])/g,"_$1").toLowerCase(),ri=(t,{defaultValue:e=void 0,removeFromUrl:n=!1}={})=>{if(qw)return e;const s=`base44_${VN(t)}`,o=new URLSearchParams(window.location.search),l=o.get(t);if(n){o.delete(t);const d=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,d)}if(l)return Oo.setItem(s,l),l;if(e)return Oo.setItem(s,e),e;const u=Oo.getItem(s);return u||null},UN=()=>(ri("clear_access_token")==="true"&&(Oo.removeItem("base44_access_token"),Oo.removeItem("token")),{appId:ri("app_id",{defaultValue:"6a7b06f6e9ea2a4e5becefb4"}),token:ri("access_token",{removeFromUrl:!0}),fromUrl:ri("from_url",{defaultValue:window.location.href}),functionsVersion:ri("functions_version",{defaultValue:"prod"}),appBaseUrl:ri("app_base_url",{defaultValue:void 0})}),To={...UN()},{appId:BN,token:$N,functionsVersion:WN,appBaseUrl:HN}=To,ko=FN({appId:BN,token:$N,functionsVersion:WN,serverUrl:"",requiresAuth:!1,appBaseUrl:HN});function qN({}){var o;const e=Zf().pathname.substring(1),{data:n,isFetched:s}=ak({queryKey:["user"],queryFn:async()=>{try{return{user:await ko.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return v.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:v.jsx("div",{className:"max-w-md w-full",children:v.jsxs("div",{className:"text-center space-y-6",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),v.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),v.jsxs("div",{className:"space-y-3",children:[v.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),v.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",v.jsxs("span",{className:"font-medium text-slate-700",children:['"',e,'"']})," could not be found in this application."]})]}),s&&n.isAuthenticated&&((o=n.user)==null?void 0:o.role)==="admin"&&v.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:v.jsxs("div",{className:"flex items-start space-x-3",children:[v.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:v.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),v.jsxs("div",{className:"text-left space-y-1",children:[v.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),v.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),v.jsx("div",{className:"pt-6",children:v.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[v.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const Qw=C.createContext(),QN=({children:t})=>{const[e,n]=C.useState(null),[s,o]=C.useState(!1),[l,u]=C.useState(!0),[d,f]=C.useState(!0),[p,g]=C.useState(null),[y,w]=C.useState(!1),[_,P]=C.useState(null);C.useEffect(()=>{E()},[]);const E=async()=>{var k,N;try{f(!0),g(null);const F=_o({baseURL:"/api/apps/public",headers:{"X-App-Id":To.appId},token:To.token,interceptResponses:!0});try{const U=await F.get(`/prod/public-settings/by-id/${To.appId}`);P(U),To.token?await S():(u(!1),o(!1),w(!0)),f(!1)}catch(U){if(console.error("App state check failed:",U),U.status===403&&((N=(k=U.data)==null?void 0:k.extra_data)!=null&&N.reason)){const q=U.data.extra_data.reason;g(q==="auth_required"?{type:"auth_required",message:"Authentication required"}:q==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:q,message:U.message})}else g({type:"unknown",message:U.message||"Failed to load app"});f(!1),u(!1)}}catch(F){console.error("Unexpected error:",F),g({type:"unknown",message:F.message||"An unexpected error occurred"}),f(!1),u(!1)}},S=async()=>{try{u(!0);const k=await ko.auth.me();n(k),o(!0),u(!1),w(!0)}catch(k){console.error("User auth check failed:",k),u(!1),o(!1),w(!0),(k.status===401||k.status===403)&&g({type:"auth_required",message:"Authentication required"})}},b=(k=!0)=>{n(null),o(!1),k?ko.auth.logout(window.location.href):ko.auth.logout()},R=()=>{ko.auth.redirectToLogin(window.location.href)};return v.jsx(Qw.Provider,{value:{user:e,isAuthenticated:s,isLoadingAuth:l,isLoadingPublicSettings:d,authError:p,appPublicSettings:_,authChecked:y,logout:b,navigateToLogin:R,checkUserAuth:S,checkAppState:E},children:t})},KN=()=>{const t=C.useContext(Qw);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},GN=()=>v.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:v.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:v.jsxs("div",{className:"text-center",children:[v.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:v.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),v.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),v.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),v.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[v.jsx("p",{children:"If you believe this is an error, you can:"}),v.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[v.jsx("li",{children:"Verify you are logged in with the correct account"}),v.jsx("li",{children:"Contact the app administrator for access"}),v.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),XN=t=>{const e=t.slice(1);try{return decodeURIComponent(e)}catch{return e}};function YN(){const{pathname:t,hash:e}=Zf(),n=Dk();return C.useEffect(()=>{if(n!=="POP"){if(e){const s=XN(e),o=window.setTimeout(()=>{var l;(l=document.getElementById(s))==null||l.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(o)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[t,e,n]),null}const uv=[{label:"About Us"},{label:"Our Business",active:!0},{label:"Investor Relations"},{label:"Sustainability"},{label:"Media Centre"},{label:"Careers"}];function JN(){const[t,e]=C.useState(!1),[n,s]=C.useState(!1);return C.useEffect(()=>{const o=()=>e(window.scrollY>100);return window.addEventListener("scroll",o,{passive:!0}),()=>window.removeEventListener("scroll",o)},[]),v.jsxs("header",{className:`fixed top-0 inset-x-0 z-[1000] transition-all duration-300 ease-out bg-white/97 backdrop-blur-md border-b border-alrazah-border-light ${t?"py-2 shadow-[0_4px_12px_rgba(10,22,40,0.10)]":"py-4"}`,style:{backdropFilter:"blur(12px)"},children:[v.jsxs("nav",{className:"mx-auto max-w-[1440px] px-5 md:px-8 lg:px-16 flex items-center justify-between gap-6",children:[v.jsxs("a",{href:"#",className:"flex items-center gap-3 shrink-0",children:[v.jsxs("div",{className:"flex items-baseline gap-2",children:[v.jsx("span",{className:"font-display text-2xl leading-none text-alrazah-navy tracking-tight",children:"Alrazah"}),v.jsx("span",{className:"font-display text-2xl leading-none text-alrazah-gold italic",children:"Holding"})]}),v.jsx("span",{className:"hidden md:block h-3 w-px bg-alrazah-gold"}),v.jsx("span",{className:"hidden md:block text-[11px] font-bold uppercase tracking-[0.12em] text-alrazah-text-tertiary",children:"Project Management"})]}),v.jsx("ul",{className:"hidden lg:flex items-center gap-8",children:uv.map(o=>v.jsx("li",{children:v.jsxs("a",{href:"#",className:`group relative text-sm font-medium tracking-[0.02em] transition-colors duration-200 ${o.active?"text-alrazah-navy font-semibold":"text-alrazah-text-secondary hover:text-alrazah-navy"}`,children:[v.jsxs("span",{className:"inline-flex items-center gap-1",children:[o.label,o.label==="Our Business"&&v.jsx(X_,{className:"w-3 h-3",strokeWidth:1.5})]}),o.active&&v.jsx("span",{className:"absolute -bottom-6 left-0 right-0 h-[2px] bg-alrazah-gold"})]})},o.label))}),v.jsxs("div",{className:"flex items-center gap-5",children:[v.jsx("button",{"aria-label":"Search",className:"hidden md:block text-alrazah-text-secondary hover:text-alrazah-navy transition-colors",children:v.jsx(wC,{className:"w-5 h-5",strokeWidth:1.5})}),v.jsxs("div",{className:"hidden md:flex items-center gap-2 text-[12px] font-semibold uppercase tracking-[0.08em]",children:[v.jsx("button",{className:"text-alrazah-navy border-b border-alrazah-gold pb-0.5",children:"EN"}),v.jsx("span",{className:"text-alrazah-text-tertiary",children:"/"}),v.jsx("button",{className:"text-alrazah-text-tertiary hover:text-alrazah-navy transition-colors",children:"AR"})]}),v.jsx("a",{href:"#",className:"hidden md:inline-flex items-center text-[12px] font-semibold uppercase tracking-[0.06em] bg-alrazah-navy text-white px-4 py-2.5 rounded-[2px] hover:bg-alrazah-royal transition-colors",children:"Investor Portal"}),v.jsx("button",{"aria-label":"Open menu",className:"lg:hidden text-alrazah-navy",onClick:()=>s(!0),children:v.jsx(pC,{className:"w-6 h-6",strokeWidth:1.5})})]})]}),n&&v.jsxs("div",{className:"fixed inset-0 z-[1100] bg-alrazah-navy/98 lg:hidden",style:{background:"rgba(10,22,40,0.98)"},children:[v.jsxs("div",{className:"flex items-center justify-between px-5 py-5",children:[v.jsxs("span",{className:"font-display text-2xl text-white",children:["Alrazah ",v.jsx("span",{className:"text-alrazah-gold italic",children:"Holding"})]}),v.jsx("button",{"aria-label":"Close menu",onClick:()=>s(!1),className:"text-white",children:v.jsx(vx,{className:"w-6 h-6",strokeWidth:1.5})})]}),v.jsx("ul",{className:"px-5 pt-8 flex flex-col gap-6",children:uv.map(o=>v.jsx("li",{children:v.jsx("a",{href:"#",onClick:()=>s(!1),className:`text-[28px] font-display ${o.active?"text-alrazah-gold":"text-white"}`,children:o.label})},o.label))}),v.jsxs("div",{className:"px-5 mt-12 flex items-center gap-6 text-white/70 text-[12px] font-semibold uppercase tracking-[0.08em]",children:[v.jsx("button",{className:"text-alrazah-gold border-b border-alrazah-gold pb-0.5",children:"EN"}),v.jsx("button",{children:"AR"}),v.jsx("a",{href:"#",className:"ml-auto text-white",children:"Investor Portal"})]})]})]})}const cv=["Home","Our Business","Project Management","Delivery Standards"],ZN=["Overview","Delivery Standards","Our Projects","Capabilities"];function e2(){return v.jsx("div",{className:"sticky top-[68px] md:top-[88px] z-[900] bg-alrazah-pearl border-b border-alrazah-border-light",children:v.jsxs("div",{className:"mx-auto max-w-[1440px] px-5 md:px-8 lg:px-16 h-12 flex items-center justify-between gap-4",children:[v.jsx("nav",{"aria-label":"Breadcrumb",className:"flex items-center flex-wrap gap-1 text-[12px] font-medium",children:cv.map((t,e)=>{const n=e===cv.length-1;return v.jsxs("span",{className:"flex items-center",children:[v.jsx("a",{href:"#",className:`transition-colors ${n?"text-alrazah-navy font-semibold":"text-alrazah-text-tertiary hover:text-alrazah-royal"}`,children:t}),!n&&v.jsx(J_,{className:"w-3 h-3 mx-2 text-alrazah-text-tertiary",strokeWidth:1.5})]},t)})}),v.jsx("nav",{className:"hidden md:flex items-center gap-6 text-[12px] font-medium uppercase tracking-[0.08em]",children:ZN.map(t=>{const e=t==="Delivery Standards";return v.jsxs("a",{href:"#",className:`relative pb-1.5 transition-colors ${e?"text-alrazah-navy font-semibold":"text-alrazah-text-tertiary hover:text-alrazah-text-secondary"}`,children:[t,e&&v.jsx("span",{className:"absolute -bottom-px left-0 right-0 h-[2px] bg-alrazah-gold"})]},t)})})]})})}const Kw=C.createContext({});function t2(t){const e=C.useRef(null);return e.current===null&&(e.current=t()),e.current}const hh=C.createContext(null),Gw=C.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function n2(t=!0){const e=C.useContext(hh);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:o}=e,l=C.useId();C.useEffect(()=>{t&&o(l)},[t]);const u=C.useCallback(()=>t&&s&&s(l),[l,s,t]);return!n&&s?[!1,u]:[!0]}const ph=typeof window<"u",r2=ph?C.useLayoutEffect:C.useEffect,Qt=t=>t;let Xw=Qt;function mh(t){let e;return()=>(e===void 0&&(e=t()),e)}const _i=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},Zn=t=>t*1e3,er=t=>t/1e3,s2={useManualTiming:!1};function i2(t){let e=new Set,n=new Set,s=!1,o=!1;const l=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function d(p){l.has(p)&&(f.schedule(p),t()),p(u)}const f={schedule:(p,g=!1,y=!1)=>{const _=y&&s?e:n;return g&&l.add(p),_.has(p)||_.add(p),p},cancel:p=>{n.delete(p),l.delete(p)},process:p=>{if(u=p,s){o=!0;return}s=!0,[e,n]=[n,e],e.forEach(d),e.clear(),s=!1,o&&(o=!1,f.process(p))}};return f}const kl=["read","resolveKeyframes","update","preRender","render","postRender"],o2=40;function Yw(t,e){let n=!1,s=!0;const o={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,u=kl.reduce((b,R)=>(b[R]=i2(l),b),{}),{read:d,resolveKeyframes:f,update:p,preRender:g,render:y,postRender:w}=u,_=()=>{const b=performance.now();n=!1,o.delta=s?1e3/60:Math.max(Math.min(b-o.timestamp,o2),1),o.timestamp=b,o.isProcessing=!0,d.process(o),f.process(o),p.process(o),g.process(o),y.process(o),w.process(o),o.isProcessing=!1,n&&e&&(s=!1,t(_))},P=()=>{n=!0,s=!0,o.isProcessing||t(_)};return{schedule:kl.reduce((b,R)=>{const k=u[R];return b[R]=(N,F=!1,U=!1)=>(n||P(),k.schedule(N,F,U)),b},{}),cancel:b=>{for(let R=0;Rdv[t].some(n=>!!e[n])};function a2(t){for(const e in t)Ci[e]={...Ci[e],...t[e]}}const l2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Gl(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||l2.has(t)}let Zw=t=>!Gl(t);function u2(t){t&&(Zw=e=>e.startsWith("on")?!Gl(e):t(e))}try{u2(require("@emotion/is-prop-valid").default)}catch{}function c2(t,e,n){const s={};for(const o in t)o==="values"&&typeof t.values=="object"||(Zw(o)||n===!0&&Gl(o)||!e&&!Gl(o)||t.draggable&&o.startsWith("onDrag"))&&(s[o]=t[o]);return s}function d2(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,o)=>o==="create"?t:(e.has(o)||e.set(o,t(o)),e.get(o))})}const cu=C.createContext({});function Uo(t){return typeof t=="string"||Array.isArray(t)}function du(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const gh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yh=["initial",...gh];function fu(t){return du(t.animate)||yh.some(e=>Uo(t[e]))}function e1(t){return!!(fu(t)||t.variants)}function f2(t,e){if(fu(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Uo(n)?n:void 0,animate:Uo(s)?s:void 0}}return t.inherit!==!1?e:{}}function h2(t){const{initial:e,animate:n}=f2(t,C.useContext(cu));return C.useMemo(()=>({initial:e,animate:n}),[fv(e),fv(n)])}function fv(t){return Array.isArray(t)?t.join(" "):t}const p2=Symbol.for("motionComponentSymbol");function si(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function m2(t,e,n){return C.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):si(n)&&(n.current=s))},[e])}const vh=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),g2="framerAppearId",t1="data-"+vh(g2),{schedule:xh}=Yw(queueMicrotask,!1),n1=C.createContext({});function y2(t,e,n,s,o){var l,u;const{visualElement:d}=C.useContext(cu),f=C.useContext(Jw),p=C.useContext(hh),g=C.useContext(Gw).reducedMotion,y=C.useRef(null);s=s||f.renderer,!y.current&&s&&(y.current=s(t,{visualState:e,parent:d,props:n,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:g}));const w=y.current,_=C.useContext(n1);w&&!w.projection&&o&&(w.type==="html"||w.type==="svg")&&v2(y.current,n,o,_);const P=C.useRef(!1);C.useInsertionEffect(()=>{w&&P.current&&w.update(n,p)});const E=n[t1],S=C.useRef(!!E&&!(!((l=window.MotionHandoffIsComplete)===null||l===void 0)&&l.call(window,E))&&((u=window.MotionHasOptimisedAnimation)===null||u===void 0?void 0:u.call(window,E)));return r2(()=>{w&&(P.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),xh.render(w.render),S.current&&w.animationState&&w.animationState.animateChanges())}),C.useEffect(()=>{w&&(!S.current&&w.animationState&&w.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,E)}),S.current=!1))}),w}function v2(t,e,n,s){const{layoutId:o,layout:l,drag:u,dragConstraints:d,layoutScroll:f,layoutRoot:p}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:r1(t.parent)),t.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!u||d&&si(d),visualElement:t,animationType:typeof l=="string"?l:"both",initialPromotionConfig:s,layoutScroll:f,layoutRoot:p})}function r1(t){if(t)return t.options.allowProjection!==!1?t.projection:r1(t.parent)}function x2({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:o}){var l,u;t&&a2(t);function d(p,g){let y;const w={...C.useContext(Gw),...p,layoutId:w2(p)},{isStatic:_}=w,P=h2(p),E=s(p,_);if(!_&&ph){S2();const S=b2(w);y=S.MeasureLayout,P.visualElement=y2(o,E,w,e,S.ProjectionNode)}return v.jsxs(cu.Provider,{value:P,children:[y&&P.visualElement?v.jsx(y,{visualElement:P.visualElement,...w}):null,n(o,p,m2(E,P.visualElement,g),E,_,P.visualElement)]})}d.displayName=`motion.${typeof o=="string"?o:`create(${(u=(l=o.displayName)!==null&&l!==void 0?l:o.name)!==null&&u!==void 0?u:""})`}`;const f=C.forwardRef(d);return f[p2]=o,f}function w2({layoutId:t}){const e=C.useContext(Kw).id;return e&&t!==void 0?e+"-"+t:t}function S2(t,e){C.useContext(Jw).strict}function b2(t){const{drag:e,layout:n}=Ci;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const E2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function wh(t){return typeof t!="string"||t.includes("-")?!1:!!(E2.indexOf(t)>-1||/[A-Z]/u.test(t))}function hv(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Sh(t,e,n,s){if(typeof e=="function"){const[o,l]=hv(s);e=e(n!==void 0?n:t.custom,o,l)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[o,l]=hv(s);e=e(n!==void 0?n:t.custom,o,l)}return e}const wf=t=>Array.isArray(t),_2=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),C2=t=>wf(t)?t[t.length-1]||0:t,kt=t=>!!(t&&t.getVelocity);function zl(t){const e=kt(t)?t.get():t;return _2(e)?e.toValue():e}function T2({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},s,o,l){const u={latestValues:k2(s,o,l,t),renderState:e()};return n&&(u.onMount=d=>n({props:s,current:d,...u}),u.onUpdate=d=>n(d)),u}const s1=t=>(e,n)=>{const s=C.useContext(cu),o=C.useContext(hh),l=()=>T2(t,e,s,o);return n?l():t2(l)};function k2(t,e,n,s){const o={},l=s(t,{});for(const w in l)o[w]=zl(l[w]);let{initial:u,animate:d}=t;const f=fu(t),p=e1(t);e&&p&&!f&&t.inherit!==!1&&(u===void 0&&(u=e.initial),d===void 0&&(d=e.animate));let g=n?n.initial===!1:!1;g=g||u===!1;const y=g?d:u;if(y&&typeof y!="boolean"&&!du(y)){const w=Array.isArray(y)?y:[y];for(let _=0;_e=>typeof e=="string"&&e.startsWith(t),o1=i1("--"),P2=i1("var(--"),bh=t=>P2(t)?R2.test(t.split("/*")[0].trim()):!1,R2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,a1=(t,e)=>e&&typeof t=="number"?e.transform(t):t,tr=(t,e,n)=>n>e?e:ntypeof t=="number",parse:parseFloat,transform:t=>t},Bo={...Ni,transform:t=>tr(0,1,t)},Pl={...Ni,default:1},sa=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),kr=sa("deg"),jn=sa("%"),ye=sa("px"),A2=sa("vh"),N2=sa("vw"),pv={...jn,parse:t=>jn.parse(t)/100,transform:t=>jn.transform(t*100)},O2={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},D2={rotate:kr,rotateX:kr,rotateY:kr,rotateZ:kr,scale:Pl,scaleX:Pl,scaleY:Pl,scaleZ:Pl,skew:kr,skewX:kr,skewY:kr,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:Bo,originX:pv,originY:pv,originZ:ye},mv={...Ni,transform:Math.round},Eh={...O2,...D2,zIndex:mv,size:ye,fillOpacity:Bo,strokeOpacity:Bo,numOctaves:mv},j2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},L2=Ai.length;function M2(t,e,n){let s="",o=!0;for(let l=0;l({style:{},transform:{},transformOrigin:{},vars:{}}),l1=()=>({...Th(),attrs:{}}),kh=t=>typeof t=="string"&&t.toLowerCase()==="svg";function u1(t,{style:e,vars:n},s,o){Object.assign(t.style,e,o&&o.getProjectionStyles(s));for(const l in n)t.style.setProperty(l,n[l])}const c1=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function d1(t,e,n,s){u1(t,e,void 0,s);for(const o in e.attrs)t.setAttribute(c1.has(o)?o:vh(o),e.attrs[o])}const Xl={};function U2(t){Object.assign(Xl,t)}function f1(t,{layout:e,layoutId:n}){return Ns.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Xl[t]||t==="opacity")}function Ph(t,e,n){var s;const{style:o}=t,l={};for(const u in o)(kt(o[u])||e.style&&kt(e.style[u])||f1(u,t)||((s=n==null?void 0:n.getValue(u))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(l[u]=o[u]);return l}function h1(t,e,n){const s=Ph(t,e,n);for(const o in t)if(kt(t[o])||kt(e[o])){const l=Ai.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;s[l]=t[o]}return s}function B2(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const yv=["x","y","width","height","cx","cy","r"],$2={useVisualState:s1({scrapeMotionValuesFromProps:h1,createRenderState:l1,onUpdate:({props:t,prevProps:e,current:n,renderState:s,latestValues:o})=>{if(!n)return;let l=!!t.drag;if(!l){for(const d in o)if(Ns.has(d)){l=!0;break}}if(!l)return;let u=!e;if(e)for(let d=0;d{B2(n,s),Be.render(()=>{Ch(s,o,kh(n.tagName),t.transformTemplate),d1(n,s)})})}})},W2={useVisualState:s1({scrapeMotionValuesFromProps:Ph,createRenderState:Th})};function p1(t,e,n){for(const s in e)!kt(e[s])&&!f1(s,n)&&(t[s]=e[s])}function H2({transformTemplate:t},e){return C.useMemo(()=>{const n=Th();return _h(n,e,t),Object.assign({},n.vars,n.style)},[e])}function q2(t,e){const n=t.style||{},s={};return p1(s,n,t),Object.assign(s,H2(t,e)),s}function Q2(t,e){const n={},s=q2(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}function K2(t,e,n,s){const o=C.useMemo(()=>{const l=l1();return Ch(l,e,kh(s),t.transformTemplate),{...l.attrs,style:{...l.style}}},[e]);if(t.style){const l={};p1(l,t.style,t),o.style={...l,...o.style}}return o}function G2(t=!1){return(n,s,o,{latestValues:l},u)=>{const f=(wh(n)?K2:Q2)(s,l,u,n),p=c2(s,typeof n=="string",t),g=n!==C.Fragment?{...p,...f,ref:o}:{},{children:y}=s,w=C.useMemo(()=>kt(y)?y.get():y,[y]);return C.createElement(n,{...g,children:w})}}function X2(t,e){return function(s,{forwardMotionProps:o}={forwardMotionProps:!1}){const u={...wh(s)?$2:W2,preloadedFeatures:t,useRender:G2(o),createVisualElement:e,Component:s};return x2(u)}}function m1(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;swindow.ScrollTimeline!==void 0);class J2{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s{if(Y2()&&o.attachTimeline)return o.attachTimeline(e);if(typeof n=="function")return n(o)});return()=>{s.forEach((o,l)=>{o&&o(),this.animations[l].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;nn[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Z2 extends J2{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function Rh(t,e){return t?t[e]||t.default||t:void 0}const Sf=2e4;function g1(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e=Sf?1/0:e}function Ah(t){return typeof t=="function"}function vv(t,e){t.timeline=e,t.onfinish=null}const Nh=t=>Array.isArray(t)&&typeof t[0]=="number",eO={linearEasing:void 0};function tO(t,e){const n=mh(t);return()=>{var s;return(s=eO[e])!==null&&s!==void 0?s:n()}}const Yl=tO(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),y1=(t,e,n=10)=>{let s="";const o=Math.max(Math.round(e/n),2);for(let l=0;l`cubic-bezier(${t}, ${e}, ${n}, ${s})`,bf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Po([0,.65,.55,1]),circOut:Po([.55,0,1,.45]),backIn:Po([.31,.01,.66,-.59]),backOut:Po([.33,1.53,.69,.99])};function x1(t,e){if(t)return typeof t=="function"&&Yl()?y1(t,e):Nh(t)?Po(t):Array.isArray(t)?t.map(n=>x1(n,e)||bf.easeOut):bf[t]}const wn={x:!1,y:!1};function w1(){return wn.x||wn.y}function S1(t,e,n){var s;if(t instanceof Element)return[t];if(typeof t=="string"){let o=document;const l=(s=void 0)!==null&&s!==void 0?s:o.querySelectorAll(t);return l?Array.from(l):[]}return Array.from(t)}function b1(t,e){const n=S1(t),s=new AbortController,o={passive:!0,...e,signal:s.signal};return[n,o,()=>s.abort()]}function xv(t){return e=>{e.pointerType==="touch"||w1()||t(e)}}function nO(t,e,n={}){const[s,o,l]=b1(t,n),u=xv(d=>{const{target:f}=d,p=e(d);if(typeof p!="function"||!f)return;const g=xv(y=>{p(y),f.removeEventListener("pointerleave",g)});f.addEventListener("pointerleave",g,o)});return s.forEach(d=>{d.addEventListener("pointerenter",u,o)}),l}const E1=(t,e)=>e?t===e?!0:E1(t,e.parentElement):!1,Oh=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,rO=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function sO(t){return rO.has(t.tagName)||t.tabIndex!==-1}const Ro=new WeakSet;function wv(t){return e=>{e.key==="Enter"&&t(e)}}function Td(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const iO=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=wv(()=>{if(Ro.has(n))return;Td(n,"down");const o=wv(()=>{Td(n,"up")}),l=()=>Td(n,"cancel");n.addEventListener("keyup",o,e),n.addEventListener("blur",l,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Sv(t){return Oh(t)&&!w1()}function oO(t,e,n={}){const[s,o,l]=b1(t,n),u=d=>{const f=d.currentTarget;if(!Sv(d)||Ro.has(f))return;Ro.add(f);const p=e(d),g=(_,P)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",w),!(!Sv(_)||!Ro.has(f))&&(Ro.delete(f),typeof p=="function"&&p(_,{success:P}))},y=_=>{g(_,n.useGlobalTarget||E1(f,_.target))},w=_=>{g(_,!1)};window.addEventListener("pointerup",y,o),window.addEventListener("pointercancel",w,o)};return s.forEach(d=>{!sO(d)&&d.getAttribute("tabindex")===null&&(d.tabIndex=0),(n.useGlobalTarget?window:d).addEventListener("pointerdown",u,o),d.addEventListener("focus",p=>iO(p,o),o)}),l}function aO(t){return t==="x"||t==="y"?wn[t]?null:(wn[t]=!0,()=>{wn[t]=!1}):wn.x||wn.y?null:(wn.x=wn.y=!0,()=>{wn.x=wn.y=!1})}const _1=new Set(["width","height","top","left","right","bottom",...Ai]);let Vl;function lO(){Vl=void 0}const Ln={now:()=>(Vl===void 0&&Ln.set(yt.isProcessing||s2.useManualTiming?yt.timestamp:performance.now()),Vl),set:t=>{Vl=t,queueMicrotask(lO)}};function Dh(t,e){t.indexOf(e)===-1&&t.push(e)}function jh(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Lh{constructor(){this.subscriptions=[]}add(e){return Dh(this.subscriptions,e),()=>jh(this.subscriptions,e)}notify(e,n,s){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](e,n,s);else for(let l=0;l!isNaN(parseFloat(t));class cO{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,o=!0)=>{const l=Ln.now();this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Ln.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=uO(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Lh);const s=this.events[e].add(n);return e==="change"?()=>{s(),Be.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Ln.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>bv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bv);return C1(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function $o(t,e){return new cO(t,e)}function dO(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,$o(n))}function fO(t,e){const n=hu(t,e);let{transitionEnd:s={},transition:o={},...l}=n||{};l={...l,...s};for(const u in l){const d=C2(l[u]);dO(t,u,d)}}function hO(t){return!!(kt(t)&&t.add)}function Ef(t,e){const n=t.getValue("willChange");if(hO(n))return n.add(e)}function T1(t){return t.props[t1]}const k1=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,pO=1e-7,mO=12;function gO(t,e,n,s,o){let l,u,d=0;do u=e+(n-e)/2,l=k1(u,s,o)-t,l>0?n=u:e=u;while(Math.abs(l)>pO&&++dgO(l,0,1,t,n);return l=>l===0||l===1?l:k1(o(l),e,s)}const P1=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,R1=t=>e=>1-t(1-e),A1=ia(.33,1.53,.69,.99),Mh=R1(A1),N1=P1(Mh),O1=t=>(t*=2)<1?.5*Mh(t):.5*(2-Math.pow(2,-10*(t-1))),Ih=t=>1-Math.sin(Math.acos(t)),D1=R1(Ih),j1=P1(Ih),L1=t=>/^0[^.\s]+$/u.test(t);function yO(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||L1(t):!0}const Do=t=>Math.round(t*1e5)/1e5,Fh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function vO(t){return t==null}const xO=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zh=(t,e)=>n=>!!(typeof n=="string"&&xO.test(n)&&n.startsWith(t)||e&&!vO(n)&&Object.prototype.hasOwnProperty.call(n,e)),M1=(t,e,n)=>s=>{if(typeof s!="string")return s;const[o,l,u,d]=s.match(Fh);return{[t]:parseFloat(o),[e]:parseFloat(l),[n]:parseFloat(u),alpha:d!==void 0?parseFloat(d):1}},wO=t=>tr(0,255,t),kd={...Ni,transform:t=>Math.round(wO(t))},fs={test:zh("rgb","red"),parse:M1("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+kd.transform(t)+", "+kd.transform(e)+", "+kd.transform(n)+", "+Do(Bo.transform(s))+")"};function SO(t){let e="",n="",s="",o="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),o=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),o=t.substring(4,5),e+=e,n+=n,s+=s,o+=o),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:o?parseInt(o,16)/255:1}}const _f={test:zh("#"),parse:SO,transform:fs.transform},ii={test:zh("hsl","hue"),parse:M1("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+jn.transform(Do(e))+", "+jn.transform(Do(n))+", "+Do(Bo.transform(s))+")"},Tt={test:t=>fs.test(t)||_f.test(t)||ii.test(t),parse:t=>fs.test(t)?fs.parse(t):ii.test(t)?ii.parse(t):_f.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?fs.transform(t):ii.transform(t)},bO=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function EO(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Fh))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(bO))===null||n===void 0?void 0:n.length)||0)>0}const I1="number",F1="color",_O="var",CO="var(",Ev="${}",TO=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Wo(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},o=[];let l=0;const d=e.replace(TO,f=>(Tt.test(f)?(s.color.push(l),o.push(F1),n.push(Tt.parse(f))):f.startsWith(CO)?(s.var.push(l),o.push(_O),n.push(f)):(s.number.push(l),o.push(I1),n.push(parseFloat(f))),++l,Ev)).split(Ev);return{values:n,split:d,indexes:s,types:o}}function z1(t){return Wo(t).values}function V1(t){const{split:e,types:n}=Wo(t),s=e.length;return o=>{let l="";for(let u=0;utypeof t=="number"?0:t;function PO(t){const e=z1(t);return V1(t)(e.map(kO))}const Vr={test:EO,parse:z1,createTransformer:V1,getAnimatableNone:PO},RO=new Set(["brightness","contrast","saturate","opacity"]);function AO(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Fh)||[];if(!s)return t;const o=n.replace(s,"");let l=RO.has(e)?1:0;return s!==n&&(l*=100),e+"("+l+o+")"}const NO=/\b([a-z-]*)\(.*?\)/gu,Cf={...Vr,getAnimatableNone:t=>{const e=t.match(NO);return e?e.map(AO).join(" "):t}},OO={...Eh,color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:Cf,WebkitFilter:Cf},Vh=t=>OO[t];function U1(t,e){let n=Vh(t);return n!==Cf&&(n=Vr),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const DO=new Set(["auto","none","0"]);function jO(t,e,n){let s=0,o;for(;st===Ni||t===ye,Cv=(t,e)=>parseFloat(t.split(", ")[e]),Tv=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const o=s.match(/^matrix3d\((.+)\)$/u);if(o)return Cv(o[1],e);{const l=s.match(/^matrix\((.+)\)$/u);return l?Cv(l[1],t):0}},LO=new Set(["x","y","z"]),MO=Ai.filter(t=>!LO.has(t));function IO(t){const e=[];return MO.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const Ti={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:Tv(4,13),y:Tv(5,14)};Ti.translateX=Ti.x;Ti.translateY=Ti.y;const _s=new Set;let Tf=!1,kf=!1;function B1(){if(kf){const t=Array.from(_s).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const o=IO(s);o.length&&(n.set(s,o),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const o=n.get(s);o&&o.forEach(([l,u])=>{var d;(d=s.getValue(l))===null||d===void 0||d.set(u)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}kf=!1,Tf=!1,_s.forEach(t=>t.complete()),_s.clear()}function $1(){_s.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(kf=!0)})}function FO(){$1(),B1()}class Uh{constructor(e,n,s,o,l,u=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=o,this.element=l,this.isAsync=u}scheduleResolve(){this.isScheduled=!0,this.isAsync?(_s.add(this),Tf||(Tf=!0,Be.read($1),Be.resolveKeyframes(B1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:o}=this;for(let l=0;l/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),zO=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function VO(t){const e=zO.exec(t);if(!e)return[,];const[,n,s,o]=e;return[`--${n??s}`,o]}function H1(t,e,n=1){const[s,o]=VO(t);if(!s)return;const l=window.getComputedStyle(e).getPropertyValue(s);if(l){const u=l.trim();return W1(u)?parseFloat(u):u}return bh(o)?H1(o,e,n+1):o}const q1=t=>e=>e.test(t),UO={test:t=>t==="auto",parse:t=>t},Q1=[Ni,ye,jn,kr,N2,A2,UO],kv=t=>Q1.find(q1(t));class K1 extends Uh{constructor(e,n,s,o,l){super(e,n,s,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let f=0;f{n.getValue(f).set(p)}),this.resolveNoneKeyframes()}}const Pv=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Vr.test(t)||t==="0")&&!t.startsWith("url("));function BO(t){const e=t[0];if(t.length===1)return!0;for(let n=0;nt!==null;function pu(t,{repeat:e,repeatType:n="loop"},s){const o=t.filter(WO),l=e&&n!=="loop"&&e%2===1?0:o.length-1;return!l||s===void 0?o[l]:s}const HO=40;class G1{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:o=0,repeatDelay:l=0,repeatType:u="loop",...d}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ln.now(),this.options={autoplay:e,delay:n,type:s,repeat:o,repeatDelay:l,repeatType:u,...d},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>HO?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&FO(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=Ln.now(),this.hasAttemptedResolve=!0;const{name:s,type:o,velocity:l,delay:u,onComplete:d,onUpdate:f,isGenerator:p}=this.options;if(!p&&!$O(e,s,o,l))if(u)this.options.duration=0;else{f&&f(pu(e,this.options,n)),d&&d(),this.resolveFinishedPromise();return}const g=this.initPlayback(e,n);g!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...g},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const qe=(t,e,n)=>t+(e-t)*n;function Pd(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function qO({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let o=0,l=0,u=0;if(!e)o=l=u=n;else{const d=n<.5?n*(1+e):n+e-n*e,f=2*n-d;o=Pd(f,d,t+1/3),l=Pd(f,d,t),u=Pd(f,d,t-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:s}}function Jl(t,e){return n=>n>0?e:t}const Rd=(t,e,n)=>{const s=t*t,o=n*(e*e-s)+s;return o<0?0:Math.sqrt(o)},QO=[_f,fs,ii],KO=t=>QO.find(e=>e.test(t));function Rv(t){const e=KO(t);if(!e)return!1;let n=e.parse(t);return e===ii&&(n=qO(n)),n}const Av=(t,e)=>{const n=Rv(t),s=Rv(e);if(!n||!s)return Jl(t,e);const o={...n};return l=>(o.red=Rd(n.red,s.red,l),o.green=Rd(n.green,s.green,l),o.blue=Rd(n.blue,s.blue,l),o.alpha=qe(n.alpha,s.alpha,l),fs.transform(o))},GO=(t,e)=>n=>e(t(n)),oa=(...t)=>t.reduce(GO),Pf=new Set(["none","hidden"]);function XO(t,e){return Pf.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function YO(t,e){return n=>qe(t,e,n)}function Bh(t){return typeof t=="number"?YO:typeof t=="string"?bh(t)?Jl:Tt.test(t)?Av:eD:Array.isArray(t)?X1:typeof t=="object"?Tt.test(t)?Av:JO:Jl}function X1(t,e){const n=[...t],s=n.length,o=t.map((l,u)=>Bh(l)(l,e[u]));return l=>{for(let u=0;u{for(const l in s)n[l]=s[l](o);return n}}function ZO(t,e){var n;const s=[],o={color:0,var:0,number:0};for(let l=0;l{const n=Vr.createTransformer(e),s=Wo(t),o=Wo(e);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?Pf.has(t)&&!o.values.length||Pf.has(e)&&!s.values.length?XO(t,e):oa(X1(ZO(s,o),o.values),n):Jl(t,e)};function Y1(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?qe(t,e,n):Bh(t)(t,e)}const tD=5;function J1(t,e,n){const s=Math.max(e-tD,0);return C1(n-t(s),e-s)}const Ge={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ad=.001;function nD({duration:t=Ge.duration,bounce:e=Ge.bounce,velocity:n=Ge.velocity,mass:s=Ge.mass}){let o,l,u=1-e;u=tr(Ge.minDamping,Ge.maxDamping,u),t=tr(Ge.minDuration,Ge.maxDuration,er(t)),u<1?(o=p=>{const g=p*u,y=g*t,w=g-n,_=Rf(p,u),P=Math.exp(-y);return Ad-w/_*P},l=p=>{const y=p*u*t,w=y*n+n,_=Math.pow(u,2)*Math.pow(p,2)*t,P=Math.exp(-y),E=Rf(Math.pow(p,2),u);return(-o(p)+Ad>0?-1:1)*((w-_)*P)/E}):(o=p=>{const g=Math.exp(-p*t),y=(p-n)*t+1;return-Ad+g*y},l=p=>{const g=Math.exp(-p*t),y=(n-p)*(t*t);return g*y});const d=5/t,f=sD(o,l,d);if(t=Zn(t),isNaN(f))return{stiffness:Ge.stiffness,damping:Ge.damping,duration:t};{const p=Math.pow(f,2)*s;return{stiffness:p,damping:u*2*Math.sqrt(s*p),duration:t}}}const rD=12;function sD(t,e,n){let s=n;for(let o=1;ot[n]!==void 0)}function aD(t){let e={velocity:Ge.velocity,stiffness:Ge.stiffness,damping:Ge.damping,mass:Ge.mass,isResolvedFromDuration:!1,...t};if(!Nv(t,oD)&&Nv(t,iD))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),o=s*s,l=2*tr(.05,1,1-(t.bounce||0))*Math.sqrt(o);e={...e,mass:Ge.mass,stiffness:o,damping:l}}else{const n=nD(t);e={...e,...n,mass:Ge.mass},e.isResolvedFromDuration=!0}return e}function Z1(t=Ge.visualDuration,e=Ge.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:o}=n;const l=n.keyframes[0],u=n.keyframes[n.keyframes.length-1],d={done:!1,value:l},{stiffness:f,damping:p,mass:g,duration:y,velocity:w,isResolvedFromDuration:_}=aD({...n,velocity:-er(n.velocity||0)}),P=w||0,E=p/(2*Math.sqrt(f*g)),S=u-l,b=er(Math.sqrt(f/g)),R=Math.abs(S)<5;s||(s=R?Ge.restSpeed.granular:Ge.restSpeed.default),o||(o=R?Ge.restDelta.granular:Ge.restDelta.default);let k;if(E<1){const F=Rf(b,E);k=U=>{const q=Math.exp(-E*b*U);return u-q*((P+E*b*S)/F*Math.sin(F*U)+S*Math.cos(F*U))}}else if(E===1)k=F=>u-Math.exp(-b*F)*(S+(P+b*S)*F);else{const F=b*Math.sqrt(E*E-1);k=U=>{const q=Math.exp(-E*b*U),z=Math.min(F*U,300);return u-q*((P+E*b*S)*Math.sinh(z)+F*S*Math.cosh(z))/F}}const N={calculatedDuration:_&&y||null,next:F=>{const U=k(F);if(_)d.done=F>=y;else{let q=0;E<1&&(q=F===0?Zn(P):J1(k,F,U));const z=Math.abs(q)<=s,Y=Math.abs(u-U)<=o;d.done=z&&Y}return d.value=d.done?u:U,d},toString:()=>{const F=Math.min(g1(N),Sf),U=y1(q=>N.next(F*q).value,F,30);return F+"ms "+U}};return N}function Ov({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:u,min:d,max:f,restDelta:p=.5,restSpeed:g}){const y=t[0],w={done:!1,value:y},_=z=>d!==void 0&&zf,P=z=>d===void 0?f:f===void 0||Math.abs(d-z)-E*Math.exp(-z/s),k=z=>b+R(z),N=z=>{const Y=R(z),ne=k(z);w.done=Math.abs(Y)<=p,w.value=w.done?b:ne};let F,U;const q=z=>{_(w.value)&&(F=z,U=Z1({keyframes:[w.value,P(w.value)],velocity:J1(k,z,w.value),damping:o,stiffness:l,restDelta:p,restSpeed:g}))};return q(0),{calculatedDuration:null,next:z=>{let Y=!1;return!U&&F===void 0&&(Y=!0,N(z),q(z)),F!==void 0&&z>=F?U.next(z-F):(!Y&&N(z),w)}}}const lD=ia(.42,0,1,1),uD=ia(0,0,.58,1),eS=ia(.42,0,.58,1),cD=t=>Array.isArray(t)&&typeof t[0]!="number",dD={linear:Qt,easeIn:lD,easeInOut:eS,easeOut:uD,circIn:Ih,circInOut:j1,circOut:D1,backIn:Mh,backInOut:N1,backOut:A1,anticipate:O1},Dv=t=>{if(Nh(t)){Xw(t.length===4);const[e,n,s,o]=t;return ia(e,n,s,o)}else if(typeof t=="string")return dD[t];return t};function fD(t,e,n){const s=[],o=n||Y1,l=t.length-1;for(let u=0;ue[0];if(l===2&&e[0]===e[1])return()=>e[1];const u=t[0]===t[1];t[0]>t[l-1]&&(t=[...t].reverse(),e=[...e].reverse());const d=fD(e,s,o),f=d.length,p=g=>{if(u&&g1)for(;yp(tr(t[0],t[l-1],g)):p}function pD(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const o=_i(0,e,s);t.push(qe(n,1,o))}}function mD(t){const e=[0];return pD(e,t.length-1),e}function gD(t,e){return t.map(n=>n*e)}function yD(t,e){return t.map(()=>e||eS).splice(0,t.length-1)}function Zl({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const o=cD(s)?s.map(Dv):Dv(s),l={done:!1,value:e[0]},u=gD(n&&n.length===e.length?n:mD(e),t),d=hD(u,e,{ease:Array.isArray(o)?o:yD(e,o)});return{calculatedDuration:t,next:f=>(l.value=d(f),l.done=f>=t,l)}}const vD=t=>{const e=({timestamp:n})=>t(n);return{start:()=>Be.update(e,!0),stop:()=>zr(e),now:()=>yt.isProcessing?yt.timestamp:Ln.now()}},xD={decay:Ov,inertia:Ov,tween:Zl,keyframes:Zl,spring:Z1},wD=t=>t/100;class $h extends G1{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:f}=this.options;f&&f()};const{name:n,motionValue:s,element:o,keyframes:l}=this.options,u=(o==null?void 0:o.KeyframeResolver)||Uh,d=(f,p)=>this.onKeyframesResolved(f,p);this.resolver=new u(l,d,n,s,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:l,velocity:u=0}=this.options,d=Ah(n)?n:xD[n]||Zl;let f,p;d!==Zl&&typeof e[0]!="number"&&(f=oa(wD,Y1(e[0],e[1])),e=[0,100]);const g=d({...this.options,keyframes:e});l==="mirror"&&(p=d({...this.options,keyframes:[...e].reverse(),velocity:-u})),g.calculatedDuration===null&&(g.calculatedDuration=g1(g));const{calculatedDuration:y}=g,w=y+o,_=w*(s+1)-o;return{generator:g,mirroredGenerator:p,mapPercentToKeyframes:f,calculatedDuration:y,resolvedDuration:w,totalDuration:_}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:z}=this.options;return{done:!0,value:z[z.length-1]}}const{finalKeyframe:o,generator:l,mirroredGenerator:u,mapPercentToKeyframes:d,keyframes:f,calculatedDuration:p,totalDuration:g,resolvedDuration:y}=s;if(this.startTime===null)return l.next(0);const{delay:w,repeat:_,repeatType:P,repeatDelay:E,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-g/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const b=this.currentTime-w*(this.speed>=0?1:-1),R=this.speed>=0?b<0:b>g;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=g);let k=this.currentTime,N=l;if(_){const z=Math.min(this.currentTime,g)/y;let Y=Math.floor(z),ne=z%1;!ne&&z>=1&&(ne=1),ne===1&&Y--,Y=Math.min(Y,_+1),!!(Y%2)&&(P==="reverse"?(ne=1-ne,E&&(ne-=E/y)):P==="mirror"&&(N=u)),k=tr(0,1,ne)*y}const F=R?{done:!1,value:f[0]}:N.next(k);d&&(F.value=d(F.value));let{done:U}=F;!R&&p!==null&&(U=this.speed>=0?this.currentTime>=g:this.currentTime<=0);const q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&U);return q&&o!==void 0&&(F.value=pu(f,this.options,o)),S&&S(F.value),q&&this.finish(),F}get duration(){const{resolved:e}=this;return e?er(e.calculatedDuration):0}get time(){return er(this.currentTime)}set time(e){e=Zn(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=er(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=vD,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(l=>this.tick(l))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const SD=new Set(["opacity","clipPath","filter","transform"]);function bD(t,e,n,{delay:s=0,duration:o=300,repeat:l=0,repeatType:u="loop",ease:d="easeInOut",times:f}={}){const p={[e]:n};f&&(p.offset=f);const g=x1(d,o);return Array.isArray(g)&&(p.easing=g),t.animate(p,{delay:s,duration:o,easing:Array.isArray(g)?"linear":g,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"})}const ED=mh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),eu=10,_D=2e4;function CD(t){return Ah(t.type)||t.type==="spring"||!v1(t.ease)}function TD(t,e){const n=new $h({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const o=[];let l=0;for(;!s.done&&l<_D;)s=n.sample(l),o.push(s.value),l+=eu;return{times:void 0,keyframes:o,duration:l-eu,ease:"linear"}}const tS={anticipate:O1,backInOut:N1,circInOut:j1};function kD(t){return t in tS}class jv extends G1{constructor(e){super(e);const{name:n,motionValue:s,element:o,keyframes:l}=this.options;this.resolver=new K1(l,(u,d)=>this.onKeyframesResolved(u,d),n,s,o),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:s=300,times:o,ease:l,type:u,motionValue:d,name:f,startTime:p}=this.options;if(!d.owner||!d.owner.current)return!1;if(typeof l=="string"&&Yl()&&kD(l)&&(l=tS[l]),CD(this.options)){const{onComplete:y,onUpdate:w,motionValue:_,element:P,...E}=this.options,S=TD(e,E);e=S.keyframes,e.length===1&&(e[1]=e[0]),s=S.duration,o=S.times,l=S.ease,u="keyframes"}const g=bD(d.owner.current,f,e,{...this.options,duration:s,times:o,ease:l});return g.startTime=p??this.calcStartTime(),this.pendingTimeline?(vv(g,this.pendingTimeline),this.pendingTimeline=void 0):g.onfinish=()=>{const{onComplete:y}=this.options;d.set(pu(e,this.options,n)),y&&y(),this.cancel(),this.resolveFinishedPromise()},{animation:g,duration:s,times:o,type:u,ease:l,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return er(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return er(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=Zn(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return Qt;const{animation:s}=n;vv(s,e)}return Qt}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:o,type:l,ease:u,times:d}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:p,onUpdate:g,onComplete:y,element:w,..._}=this.options,P=new $h({..._,keyframes:s,duration:o,type:l,ease:u,times:d,isGenerator:!0}),E=Zn(this.time);p.setWithVelocity(P.sample(E-eu).value,P.sample(E).value,eu)}const{onStop:f}=this.options;f&&f(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:o,repeatType:l,damping:u,type:d}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:p}=n.owner.getProps();return ED()&&s&&SD.has(s)&&!f&&!p&&!o&&l!=="mirror"&&u!==0&&d!=="inertia"}}const PD={type:"spring",stiffness:500,damping:25,restSpeed:10},RD=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),AD={type:"keyframes",duration:.8},ND={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},OD=(t,{keyframes:e})=>e.length>2?AD:Ns.has(t)?t.startsWith("scale")?RD(e[1]):PD:ND;function DD({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:o,repeat:l,repeatType:u,repeatDelay:d,from:f,elapsed:p,...g}){return!!Object.keys(g).length}const Wh=(t,e,n,s={},o,l)=>u=>{const d=Rh(s,t)||{},f=d.delay||s.delay||0;let{elapsed:p=0}=s;p=p-Zn(f);let g={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...d,delay:-p,onUpdate:w=>{e.set(w),d.onUpdate&&d.onUpdate(w)},onComplete:()=>{u(),d.onComplete&&d.onComplete()},name:t,motionValue:e,element:l?void 0:o};DD(d)||(g={...g,...OD(t,g)}),g.duration&&(g.duration=Zn(g.duration)),g.repeatDelay&&(g.repeatDelay=Zn(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let y=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(g.duration=0,g.delay===0&&(y=!0)),y&&!l&&e.get()!==void 0){const w=pu(g.keyframes,d);if(w!==void 0)return Be.update(()=>{g.onUpdate(w),g.onComplete()}),new Z2([])}return!l&&jv.supports(g)?new jv(g):new $h(g)};function jD({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function nS(t,e,{delay:n=0,transitionOverride:s,type:o}={}){var l;let{transition:u=t.getDefaultTransition(),transitionEnd:d,...f}=e;s&&(u=s);const p=[],g=o&&t.animationState&&t.animationState.getState()[o];for(const y in f){const w=t.getValue(y,(l=t.latestValues[y])!==null&&l!==void 0?l:null),_=f[y];if(_===void 0||g&&jD(g,y))continue;const P={delay:n,...Rh(u||{},y)};let E=!1;if(window.MotionHandoffAnimation){const b=T1(t);if(b){const R=window.MotionHandoffAnimation(b,y,Be);R!==null&&(P.startTime=R,E=!0)}}Ef(t,y),w.start(Wh(y,w,_,t.shouldReduceMotion&&_1.has(y)?{type:!1}:P,t,E));const S=w.animation;S&&p.push(S)}return d&&Promise.all(p).then(()=>{Be.update(()=>{d&&fO(t,d)})}),p}function Af(t,e,n={}){var s;const o=hu(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:l=t.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(l=n.transitionOverride);const u=o?()=>Promise.all(nS(t,o,n)):()=>Promise.resolve(),d=t.variantChildren&&t.variantChildren.size?(p=0)=>{const{delayChildren:g=0,staggerChildren:y,staggerDirection:w}=l;return LD(t,e,g+p,y,w,n)}:()=>Promise.resolve(),{when:f}=l;if(f){const[p,g]=f==="beforeChildren"?[u,d]:[d,u];return p().then(()=>g())}else return Promise.all([u(),d(n.delay)])}function LD(t,e,n=0,s=0,o=1,l){const u=[],d=(t.variantChildren.size-1)*s,f=o===1?(p=0)=>p*s:(p=0)=>d-p*s;return Array.from(t.variantChildren).sort(MD).forEach((p,g)=>{p.notify("AnimationStart",e),u.push(Af(p,e,{...l,delay:n+f(g)}).then(()=>p.notify("AnimationComplete",e)))}),Promise.all(u)}function MD(t,e){return t.sortNodePosition(e)}function ID(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const o=e.map(l=>Af(t,l,n));s=Promise.all(o)}else if(typeof e=="string")s=Af(t,e,n);else{const o=typeof e=="function"?hu(t,e,n.custom):e;s=Promise.all(nS(t,o,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const FD=yh.length;function rS(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?rS(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;nPromise.all(e.map(({animation:n,options:s})=>ID(t,n,s)))}function BD(t){let e=UD(t),n=Lv(),s=!0;const o=f=>(p,g)=>{var y;const w=hu(t,g,f==="exit"?(y=t.presenceContext)===null||y===void 0?void 0:y.custom:void 0);if(w){const{transition:_,transitionEnd:P,...E}=w;p={...p,...E,...P}}return p};function l(f){e=f(t)}function u(f){const{props:p}=t,g=rS(t.parent)||{},y=[],w=new Set;let _={},P=1/0;for(let S=0;SP&&N,Y=!1;const ne=Array.isArray(k)?k:[k];let ve=ne.reduce(o(b),{});F===!1&&(ve={});const{prevResolvedValues:Te={}}=R,Se={...Te,...ve},Z=ce=>{z=!0,w.has(ce)&&(Y=!0,w.delete(ce)),R.needsAnimating[ce]=!0;const K=t.getValue(ce);K&&(K.liveStyle=!1)};for(const ce in Se){const K=ve[ce],se=Te[ce];if(_.hasOwnProperty(ce))continue;let B=!1;wf(K)&&wf(se)?B=!m1(K,se):B=K!==se,B?K!=null?Z(ce):w.add(ce):K!==void 0&&w.has(ce)?Z(ce):R.protectedKeys[ce]=!0}R.prevProp=k,R.prevResolvedValues=ve,R.isActive&&(_={..._,...ve}),s&&t.blockInitialAnimation&&(z=!1),z&&(!(U&&q)||Y)&&y.push(...ne.map(ce=>({animation:ce,options:{type:b}})))}if(w.size){const S={};w.forEach(b=>{const R=t.getBaseTarget(b),k=t.getValue(b);k&&(k.liveStyle=!0),S[b]=R??null}),y.push({animation:S})}let E=!!y.length;return s&&(p.initial===!1||p.initial===p.animate)&&!t.manuallyAnimateOnMount&&(E=!1),s=!1,E?e(y):Promise.resolve()}function d(f,p){var g;if(n[f].isActive===p)return Promise.resolve();(g=t.variantChildren)===null||g===void 0||g.forEach(w=>{var _;return(_=w.animationState)===null||_===void 0?void 0:_.setActive(f,p)}),n[f].isActive=p;const y=u(f);for(const w in n)n[w].protectedKeys={};return y}return{animateChanges:u,setActive:d,setAnimateFunction:l,getState:()=>n,reset:()=>{n=Lv(),s=!0}}}function $D(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!m1(e,t):!1}function is(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Lv(){return{animate:is(!0),whileInView:is(),whileHover:is(),whileTap:is(),whileDrag:is(),whileFocus:is(),exit:is()}}class $r{constructor(e){this.isMounted=!1,this.node=e}update(){}}class WD extends $r{constructor(e){super(e),e.animationState||(e.animationState=BD(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();du(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let HD=0;class qD extends $r{constructor(){super(...arguments),this.id=HD++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const o=this.node.animationState.setActive("exit",!e);n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const QD={animation:{Feature:WD},exit:{Feature:qD}};function Ho(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function aa(t){return{point:{x:t.pageX,y:t.pageY}}}const KD=t=>e=>Oh(e)&&t(e,aa(e));function jo(t,e,n,s){return Ho(t,e,KD(n),s)}const Mv=(t,e)=>Math.abs(t-e);function GD(t,e){const n=Mv(t.x,e.x),s=Mv(t.y,e.y);return Math.sqrt(n**2+s**2)}class sS{constructor(e,n,{transformPagePoint:s,contextWindow:o,dragSnapToOrigin:l=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Od(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,_=GD(y.offset,{x:0,y:0})>=3;if(!w&&!_)return;const{point:P}=y,{timestamp:E}=yt;this.history.push({...P,timestamp:E});const{onStart:S,onMove:b}=this.handlers;w||(S&&S(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,y)},this.handlePointerMove=(y,w)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=Nd(w,this.transformPagePoint),Be.update(this.updatePoint,!0)},this.handlePointerUp=(y,w)=>{this.end();const{onEnd:_,onSessionEnd:P,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Od(y.type==="pointercancel"?this.lastMoveEventInfo:Nd(w,this.transformPagePoint),this.history);this.startEvent&&_&&_(y,S),P&&P(y,S)},!Oh(e))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=s,this.contextWindow=o||window;const u=aa(e),d=Nd(u,this.transformPagePoint),{point:f}=d,{timestamp:p}=yt;this.history=[{...f,timestamp:p}];const{onSessionStart:g}=n;g&&g(e,Od(d,this.history)),this.removeListeners=oa(jo(this.contextWindow,"pointermove",this.handlePointerMove),jo(this.contextWindow,"pointerup",this.handlePointerUp),jo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),zr(this.updatePoint)}}function Nd(t,e){return e?{point:e(t.point)}:t}function Iv(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Od({point:t},e){return{point:t,delta:Iv(t,iS(e)),offset:Iv(t,XD(e)),velocity:YD(e,.1)}}function XD(t){return t[0]}function iS(t){return t[t.length-1]}function YD(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const o=iS(t);for(;n>=0&&(s=t[n],!(o.timestamp-s.timestamp>Zn(e)));)n--;if(!s)return{x:0,y:0};const l=er(o.timestamp-s.timestamp);if(l===0)return{x:0,y:0};const u={x:(o.x-s.x)/l,y:(o.y-s.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}const oS=1e-4,JD=1-oS,ZD=1+oS,aS=.01,ej=0-aS,tj=0+aS;function Kt(t){return t.max-t.min}function nj(t,e,n){return Math.abs(t-e)<=n}function Fv(t,e,n,s=.5){t.origin=s,t.originPoint=qe(e.min,e.max,t.origin),t.scale=Kt(n)/Kt(e),t.translate=qe(n.min,n.max,t.origin)-t.originPoint,(t.scale>=JD&&t.scale<=ZD||isNaN(t.scale))&&(t.scale=1),(t.translate>=ej&&t.translate<=tj||isNaN(t.translate))&&(t.translate=0)}function Lo(t,e,n,s){Fv(t.x,e.x,n.x,s?s.originX:void 0),Fv(t.y,e.y,n.y,s?s.originY:void 0)}function zv(t,e,n){t.min=n.min+e.min,t.max=t.min+Kt(e)}function rj(t,e,n){zv(t.x,e.x,n.x),zv(t.y,e.y,n.y)}function Vv(t,e,n){t.min=e.min-n.min,t.max=t.min+Kt(e)}function Mo(t,e,n){Vv(t.x,e.x,n.x),Vv(t.y,e.y,n.y)}function sj(t,{min:e,max:n},s){return e!==void 0&&tn&&(t=s?qe(n,t,s.max):Math.min(t,n)),t}function Uv(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function ij(t,{top:e,left:n,bottom:s,right:o}){return{x:Uv(t.x,n,o),y:Uv(t.y,e,s)}}function Bv(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.mins?n=_i(e.min,e.max-s,t.min):s>o&&(n=_i(t.min,t.max-o,e.min)),tr(0,1,n)}function lj(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Nf=.35;function uj(t=Nf){return t===!1?t=0:t===!0&&(t=Nf),{x:$v(t,"left","right"),y:$v(t,"top","bottom")}}function $v(t,e,n){return{min:Wv(t,e),max:Wv(t,n)}}function Wv(t,e){return typeof t=="number"?t:t[e]||0}const Hv=()=>({translate:0,scale:1,origin:0,originPoint:0}),oi=()=>({x:Hv(),y:Hv()}),qv=()=>({min:0,max:0}),Ze=()=>({x:qv(),y:qv()});function on(t){return[t("x"),t("y")]}function lS({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function cj({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function dj(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function Dd(t){return t===void 0||t===1}function Of({scale:t,scaleX:e,scaleY:n}){return!Dd(t)||!Dd(e)||!Dd(n)}function as(t){return Of(t)||uS(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function uS(t){return Qv(t.x)||Qv(t.y)}function Qv(t){return t&&t!=="0%"}function tu(t,e,n){const s=t-n,o=e*s;return n+o}function Kv(t,e,n,s,o){return o!==void 0&&(t=tu(t,o,s)),tu(t,n,s)+e}function Df(t,e=0,n=1,s,o){t.min=Kv(t.min,e,n,s,o),t.max=Kv(t.max,e,n,s,o)}function cS(t,{x:e,y:n}){Df(t.x,e.translate,e.scale,e.originPoint),Df(t.y,n.translate,n.scale,n.originPoint)}const Gv=.999999999999,Xv=1.0000000000001;function fj(t,e,n,s=!1){const o=n.length;if(!o)return;e.x=e.y=1;let l,u;for(let d=0;dGv&&(e.x=1),e.yGv&&(e.y=1)}function ai(t,e){t.min=t.min+e,t.max=t.max+e}function Yv(t,e,n,s,o=.5){const l=qe(t.min,t.max,o);Df(t,e,n,l,s)}function li(t,e){Yv(t.x,e.x,e.scaleX,e.scale,e.originX),Yv(t.y,e.y,e.scaleY,e.scale,e.originY)}function dS(t,e){return lS(dj(t.getBoundingClientRect(),e))}function hj(t,e,n){const s=dS(t,n),{scroll:o}=e;return o&&(ai(s.x,o.offset.x),ai(s.y,o.offset.y)),s}const fS=({current:t})=>t?t.ownerDocument.defaultView:null,pj=new WeakMap;class mj{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ze(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=g=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(aa(g).point)},l=(g,y)=>{const{drag:w,dragPropagation:_,onDragStart:P}=this.getProps();if(w&&!_&&(this.openDragLock&&this.openDragLock(),this.openDragLock=aO(w),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),on(S=>{let b=this.getAxisMotionValue(S).get()||0;if(jn.test(b)){const{projection:R}=this.visualElement;if(R&&R.layout){const k=R.layout.layoutBox[S];k&&(b=Kt(k)*(parseFloat(b)/100))}}this.originPoint[S]=b}),P&&Be.postRender(()=>P(g,y)),Ef(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},u=(g,y)=>{const{dragPropagation:w,dragDirectionLock:_,onDirectionLock:P,onDrag:E}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:S}=y;if(_&&this.currentDirection===null){this.currentDirection=gj(S),this.currentDirection!==null&&P&&P(this.currentDirection);return}this.updateAxis("x",y.point,S),this.updateAxis("y",y.point,S),this.visualElement.render(),E&&E(g,y)},d=(g,y)=>this.stop(g,y),f=()=>on(g=>{var y;return this.getAnimationState(g)==="paused"&&((y=this.getAxisMotionValue(g).animation)===null||y===void 0?void 0:y.play())}),{dragSnapToOrigin:p}=this.getProps();this.panSession=new sS(e,{onSessionStart:o,onStart:l,onMove:u,onSessionEnd:d,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:p,contextWindow:fS(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&Be.postRender(()=>l(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:o}=this.getProps();if(!s||!Rl(e,o,this.currentDirection))return;const l=this.getAxisMotionValue(e);let u=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(u=sj(u,this.constraints[e],this.elastic[e])),l.set(u)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,l=this.constraints;n&&si(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=ij(o.layoutBox,n):this.constraints=!1,this.elastic=uj(s),l!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&on(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=lj(o.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!si(e))return!1;const s=e.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const l=hj(s,o.root,this.visualElement.getTransformPagePoint());let u=oj(o.layout.layoutBox,l);if(n){const d=n(cj(u));this.hasMutatedConstraints=!!d,d&&(u=lS(d))}return u}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:o,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:d}=this.getProps(),f=this.constraints||{},p=on(g=>{if(!Rl(g,n,this.currentDirection))return;let y=f&&f[g]||{};u&&(y={min:0,max:0});const w=o?200:1e6,_=o?40:1e7,P={type:"inertia",velocity:s?e[g]:0,bounceStiffness:w,bounceDamping:_,timeConstant:750,restDelta:1,restSpeed:10,...l,...y};return this.startAxisValueAnimation(g,P)});return Promise.all(p).then(d)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Ef(this.visualElement,e),s.start(Wh(e,s,0,n,this.visualElement,!1))}stopAnimation(){on(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){on(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),o=s[n];return o||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){on(n=>{const{drag:s}=this.getProps();if(!Rl(n,s,this.currentDirection))return;const{projection:o}=this.visualElement,l=this.getAxisMotionValue(n);if(o&&o.layout){const{min:u,max:d}=o.layout.layoutBox[n];l.set(e[n]-qe(u,d,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!si(n)||!s||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};on(u=>{const d=this.getAxisMotionValue(u);if(d&&this.constraints!==!1){const f=d.get();o[u]=aj({min:f,max:f},this.constraints[u])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),on(u=>{if(!Rl(u,e,null))return;const d=this.getAxisMotionValue(u),{min:f,max:p}=this.constraints[u];d.set(qe(f,p,o[u]))})}addListeners(){if(!this.visualElement.current)return;pj.set(this.visualElement,this);const e=this.visualElement.current,n=jo(e,"pointerdown",f=>{const{drag:p,dragListener:g=!0}=this.getProps();p&&g&&this.start(f)}),s=()=>{const{dragConstraints:f}=this.getProps();si(f)&&f.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,l=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Be.read(s);const u=Ho(window,"resize",()=>this.scalePositionWithinConstraints()),d=o.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:p})=>{this.isDragging&&p&&(on(g=>{const y=this.getAxisMotionValue(g);y&&(this.originPoint[g]+=f[g].translate,y.set(y.get()+f[g].translate))}),this.visualElement.render())}));return()=>{u(),n(),l(),d&&d()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:u=Nf,dragMomentum:d=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:o,dragConstraints:l,dragElastic:u,dragMomentum:d}}}function Rl(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function gj(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class yj extends $r{constructor(e){super(e),this.removeGroupControls=Qt,this.removeListeners=Qt,this.controls=new mj(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qt}unmount(){this.removeGroupControls(),this.removeListeners()}}const Jv=t=>(e,n)=>{t&&Be.postRender(()=>t(e,n))};class vj extends $r{constructor(){super(...arguments),this.removePointerDownListener=Qt}onPointerDown(e){this.session=new sS(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:fS(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:o}=this.node.getProps();return{onSessionStart:Jv(e),onStart:Jv(n),onMove:s,onEnd:(l,u)=>{delete this.session,o&&Be.postRender(()=>o(l,u))}}}mount(){this.removePointerDownListener=jo(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ul={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Zv(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bo={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ye.test(t))t=parseFloat(t);else return t;const n=Zv(t,e.target.x),s=Zv(t,e.target.y);return`${n}% ${s}%`}},xj={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,o=Vr.parse(t);if(o.length>5)return s;const l=Vr.createTransformer(t),u=typeof o[0]!="number"?1:0,d=n.x.scale*e.x,f=n.y.scale*e.y;o[0+u]/=d,o[1+u]/=f;const p=qe(d,f,.5);return typeof o[2+u]=="number"&&(o[2+u]/=p),typeof o[3+u]=="number"&&(o[3+u]/=p),l(o)}};class wj extends C.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:o}=this.props,{projection:l}=e;U2(Sj),l&&(n.group&&n.group.add(l),s&&s.register&&o&&s.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,onExitComplete:()=>this.safeToRemove()})),Ul.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:o,isPresent:l}=this.props,u=s.projection;return u&&(u.isPresent=l,o||e.layoutDependency!==n||n===void 0?u.willUpdate():this.safeToRemove(),e.isPresent!==l&&(l?u.promote():u.relegate()||Be.postRender(()=>{const d=u.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),xh.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:o}=e;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),s&&s.deregister&&s.deregister(o))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function hS(t){const[e,n]=n2(),s=C.useContext(Kw);return v.jsx(wj,{...t,layoutGroup:s,switchLayoutGroup:C.useContext(n1),isPresent:e,safeToRemove:n})}const Sj={borderRadius:{...bo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:bo,borderTopRightRadius:bo,borderBottomLeftRadius:bo,borderBottomRightRadius:bo,boxShadow:xj};function bj(t,e,n){const s=kt(t)?t:$o(t);return s.start(Wh("",s,e,n)),s.animation}function Ej(t){return t instanceof SVGElement&&t.tagName!=="svg"}const _j=(t,e)=>t.depth-e.depth;class Cj{constructor(){this.children=[],this.isDirty=!1}add(e){Dh(this.children,e),this.isDirty=!0}remove(e){jh(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(_j),this.isDirty=!1,this.children.forEach(e)}}function Tj(t,e){const n=Ln.now(),s=({timestamp:o})=>{const l=o-n;l>=e&&(zr(s),t(l-e))};return Be.read(s,!0),()=>zr(s)}const pS=["TopLeft","TopRight","BottomLeft","BottomRight"],kj=pS.length,e0=t=>typeof t=="string"?parseFloat(t):t,t0=t=>typeof t=="number"||ye.test(t);function Pj(t,e,n,s,o,l){o?(t.opacity=qe(0,n.opacity!==void 0?n.opacity:1,Rj(s)),t.opacityExit=qe(e.opacity!==void 0?e.opacity:1,0,Aj(s))):l&&(t.opacity=qe(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let u=0;use?1:n(_i(t,e,s))}function r0(t,e){t.min=e.min,t.max=e.max}function sn(t,e){r0(t.x,e.x),r0(t.y,e.y)}function s0(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function i0(t,e,n,s,o){return t-=e,t=tu(t,1/n,s),o!==void 0&&(t=tu(t,1/o,s)),t}function Nj(t,e=0,n=1,s=.5,o,l=t,u=t){if(jn.test(e)&&(e=parseFloat(e),e=qe(u.min,u.max,e/100)-u.min),typeof e!="number")return;let d=qe(l.min,l.max,s);t===l&&(d-=e),t.min=i0(t.min,e,n,d,o),t.max=i0(t.max,e,n,d,o)}function o0(t,e,[n,s,o],l,u){Nj(t,e[n],e[s],e[o],e.scale,l,u)}const Oj=["x","scaleX","originX"],Dj=["y","scaleY","originY"];function a0(t,e,n,s){o0(t.x,e,Oj,n?n.x:void 0,s?s.x:void 0),o0(t.y,e,Dj,n?n.y:void 0,s?s.y:void 0)}function l0(t){return t.translate===0&&t.scale===1}function gS(t){return l0(t.x)&&l0(t.y)}function u0(t,e){return t.min===e.min&&t.max===e.max}function jj(t,e){return u0(t.x,e.x)&&u0(t.y,e.y)}function c0(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function yS(t,e){return c0(t.x,e.x)&&c0(t.y,e.y)}function d0(t){return Kt(t.x)/Kt(t.y)}function f0(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Lj{constructor(){this.members=[]}add(e){Dh(this.members,e),e.scheduleRender()}remove(e){if(jh(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(o=>e===o);if(n===0)return!1;let s;for(let o=n;o>=0;o--){const l=this.members[o];if(l.isPresent!==!1){s=l;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:o}=e.options;o===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Mj(t,e,n){let s="";const o=t.x.translate/e.x,l=t.y.translate/e.y,u=(n==null?void 0:n.z)||0;if((o||l||u)&&(s=`translate3d(${o}px, ${l}px, ${u}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:p,rotate:g,rotateX:y,rotateY:w,skewX:_,skewY:P}=n;p&&(s=`perspective(${p}px) ${s}`),g&&(s+=`rotate(${g}deg) `),y&&(s+=`rotateX(${y}deg) `),w&&(s+=`rotateY(${w}deg) `),_&&(s+=`skewX(${_}deg) `),P&&(s+=`skewY(${P}deg) `)}const d=t.x.scale*e.x,f=t.y.scale*e.y;return(d!==1||f!==1)&&(s+=`scale(${d}, ${f})`),s||"none"}const ls={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ao=typeof window<"u"&&window.MotionDebug!==void 0,jd=["","X","Y","Z"],Ij={visibility:"hidden"},h0=1e3;let Fj=0;function Ld(t,e,n,s){const{latestValues:o}=e;o[t]&&(n[t]=o[t],e.setStaticValue(t,0),s&&(s[t]=0))}function vS(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=T1(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:l}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Be,!(o||l))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&vS(s)}function xS({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(u={},d=e==null?void 0:e()){this.id=Fj++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ao&&(ls.totalNodes=ls.resolvedTargetDeltas=ls.recalculatedProjection=0),this.nodes.forEach(Uj),this.nodes.forEach(qj),this.nodes.forEach(Qj),this.nodes.forEach(Bj),Ao&&window.MotionDebug.record(ls)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let f=0;fthis.root.updateBlockedByResize=!1;t(u,()=>{this.root.updateBlockedByResize=!0,y&&y(),y=Tj(w,250),Ul.hasAnimatedSinceResize&&(Ul.hasAnimatedSinceResize=!1,this.nodes.forEach(m0))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&g&&(f||p)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:w,hasRelativeTargetChanged:_,layout:P})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||g.getDefaultTransition()||Jj,{onLayoutAnimationStart:S,onLayoutAnimationComplete:b}=g.getProps(),R=!this.targetLayout||!yS(this.targetLayout,P)||_,k=!w&&_;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||k||w&&(R||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(y,k);const N={...Rh(E,"layout"),onPlay:S,onComplete:b};(g.shouldReduceMotion||this.options.layoutRoot)&&(N.delay=0,N.type=!1),this.startAnimation(N)}else w||m0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=P})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Kj),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&vS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f{const F=N/1e3;g0(y.x,u.x,F),g0(y.y,u.y,F),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Xj(this.relativeTarget,this.relativeTargetOrigin,w,F),k&&jj(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=Ze()),sn(k,this.relativeTarget)),E&&(this.animationValues=g,Pj(g,p,this.latestValues,F,R,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=F},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Be.update(()=>{Ul.hasAnimatedSinceResize=!0,this.currentAnimation=bj(0,h0,{...u,onUpdate:d=>{this.mixTargetDelta(d),u.onUpdate&&u.onUpdate(d)},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(h0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:d,target:f,layout:p,latestValues:g}=u;if(!(!d||!f||!p)){if(this!==u&&this.layout&&p&&wS(this.options.animationType,this.layout.layoutBox,p.layoutBox)){f=this.target||Ze();const y=Kt(this.layout.layoutBox.x);f.x.min=u.target.x.min,f.x.max=f.x.min+y;const w=Kt(this.layout.layoutBox.y);f.y.min=u.target.y.min,f.y.max=f.y.min+w}sn(d,f),li(d,g),Lo(this.projectionDeltaWithTransform,this.layoutCorrected,d,g)}}registerSharedNode(u,d){this.sharedNodes.has(u)||this.sharedNodes.set(u,new Lj),this.sharedNodes.get(u).add(d);const p=d.options.initialPromotionConfig;d.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(d):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var u;const{layoutId:d}=this.options;return d?((u=this.getStack())===null||u===void 0?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:d}=this.options;return d?(u=this.getStack())===null||u===void 0?void 0:u.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:d,preserveFollowOpacity:f}={}){const p=this.getStack();p&&p.promote(this,f),u&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let d=!1;const{latestValues:f}=u;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(d=!0),!d)return;const p={};f.z&&Ld("z",u,p,this.animationValues);for(let g=0;g{var d;return(d=u.currentAnimation)===null||d===void 0?void 0:d.stop()}),this.root.nodes.forEach(p0),this.root.sharedNodes.clear()}}}function zj(t){t.updateLayout()}function Vj(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=t.layout,{animationType:l}=t.options,u=n.source!==t.layout.source;l==="size"?on(y=>{const w=u?n.measuredBox[y]:n.layoutBox[y],_=Kt(w);w.min=s[y].min,w.max=w.min+_}):wS(l,n.layoutBox,s)&&on(y=>{const w=u?n.measuredBox[y]:n.layoutBox[y],_=Kt(s[y]);w.max=w.min+_,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[y].max=t.relativeTarget[y].min+_)});const d=oi();Lo(d,s,n.layoutBox);const f=oi();u?Lo(f,t.applyTransform(o,!0),n.measuredBox):Lo(f,s,n.layoutBox);const p=!gS(d);let g=!1;if(!t.resumeFrom){const y=t.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:w,layout:_}=y;if(w&&_){const P=Ze();Mo(P,n.layoutBox,w.layoutBox);const E=Ze();Mo(E,s,_.layoutBox),yS(P,E)||(g=!0),y.options.layoutRoot&&(t.relativeTarget=E,t.relativeTargetOrigin=P,t.relativeParent=y)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:f,layoutDelta:d,hasLayoutChanged:p,hasRelativeTargetChanged:g})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Uj(t){Ao&&ls.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Bj(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function $j(t){t.clearSnapshot()}function p0(t){t.clearMeasurements()}function Wj(t){t.isLayoutDirty=!1}function Hj(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function m0(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function qj(t){t.resolveTargetDelta()}function Qj(t){t.calcProjection()}function Kj(t){t.resetSkewAndRotation()}function Gj(t){t.removeLeadSnapshot()}function g0(t,e,n){t.translate=qe(e.translate,0,n),t.scale=qe(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function y0(t,e,n,s){t.min=qe(e.min,n.min,s),t.max=qe(e.max,n.max,s)}function Xj(t,e,n,s){y0(t.x,e.x,n.x,s),y0(t.y,e.y,n.y,s)}function Yj(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Jj={duration:.45,ease:[.4,0,.1,1]},v0=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),x0=v0("applewebkit/")&&!v0("chrome/")?Math.round:Qt;function w0(t){t.min=x0(t.min),t.max=x0(t.max)}function Zj(t){w0(t.x),w0(t.y)}function wS(t,e,n){return t==="position"||t==="preserve-aspect"&&!nj(d0(e),d0(n),.2)}function eL(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const tL=xS({attachResizeListener:(t,e)=>Ho(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Md={current:void 0},SS=xS({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Md.current){const t=new tL({});t.mount(window),t.setOptions({layoutScroll:!0}),Md.current=t}return Md.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),nL={pan:{Feature:vj},drag:{Feature:yj,ProjectionNode:SS,MeasureLayout:hS}};function S0(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,l=s[o];l&&Be.postRender(()=>l(e,aa(e)))}class rL extends $r{mount(){const{current:e}=this.node;e&&(this.unmount=nO(e,n=>(S0(this.node,n,"Start"),s=>S0(this.node,s,"End"))))}unmount(){}}class sL extends $r{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=oa(Ho(this.node.current,"focus",()=>this.onFocus()),Ho(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function b0(t,e,n){const{props:s}=t;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),l=s[o];l&&Be.postRender(()=>l(e,aa(e)))}class iL extends $r{mount(){const{current:e}=this.node;e&&(this.unmount=oO(e,n=>(b0(this.node,n,"Start"),(s,{success:o})=>b0(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jf=new WeakMap,Id=new WeakMap,oL=t=>{const e=jf.get(t.target);e&&e(t)},aL=t=>{t.forEach(oL)};function lL({root:t,...e}){const n=t||document;Id.has(n)||Id.set(n,{});const s=Id.get(n),o=JSON.stringify(e);return s[o]||(s[o]=new IntersectionObserver(aL,{root:t,...e})),s[o]}function uL(t,e,n){const s=lL(e);return jf.set(t,n),s.observe(t),()=>{jf.delete(t),s.unobserve(t)}}const cL={some:0,all:1};class dL extends $r{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:o="some",once:l}=e,u={root:n?n.current:void 0,rootMargin:s,threshold:typeof o=="number"?o:cL[o]},d=f=>{const{isIntersecting:p}=f;if(this.isInView===p||(this.isInView=p,l&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:g,onViewportLeave:y}=this.node.getProps(),w=p?g:y;w&&w(f)};return uL(this.node.current,u,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(fL(e,n))&&this.startObserver()}unmount(){}}function fL({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const hL={inView:{Feature:dL},tap:{Feature:iL},focus:{Feature:sL},hover:{Feature:rL}},pL={layout:{ProjectionNode:SS,MeasureLayout:hS}},Lf={current:null},bS={current:!1};function mL(){if(bS.current=!0,!!ph)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Lf.current=t.matches;t.addListener(e),e()}else Lf.current=!1}const gL=[...Q1,Tt,Vr],yL=t=>gL.find(q1(t)),E0=new WeakMap;function vL(t,e,n){for(const s in e){const o=e[s],l=n[s];if(kt(o))t.addValue(s,o);else if(kt(l))t.addValue(s,$o(o,{owner:t}));else if(l!==o)if(t.hasValue(s)){const u=t.getValue(s);u.liveStyle===!0?u.jump(o):u.hasAnimated||u.set(o)}else{const u=t.getStaticValue(s);t.addValue(s,$o(u!==void 0?u:o,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const _0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class xL{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:o,blockInitialAnimation:l,visualState:u},d={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Uh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const _=Ln.now();this.renderScheduledAt<_&&(this.renderScheduledAt=_,Be.render(this.render,!1,!0))};const{latestValues:f,renderState:p,onUpdate:g}=u;this.onUpdate=g,this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},this.renderState=p,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=o,this.options=d,this.blockInitialAnimation=!!l,this.isControllingVariants=fu(n),this.isVariantNode=e1(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:y,...w}=this.scrapeMotionValuesFromProps(n,{},this);for(const _ in w){const P=w[_];f[_]!==void 0&&kt(P)&&P.set(f[_],!1)}}mount(e){this.current=e,E0.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),bS.current||mL(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Lf.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){E0.delete(this.current),this.projection&&this.projection.unmount(),zr(this.notifyUpdate),zr(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=Ns.has(e),o=n.on("change",d=>{this.latestValues[e]=d,this.props.onUpdate&&Be.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),l=n.on("renderRequest",this.scheduleRender);let u;window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{o(),l(),u&&u(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ci){const n=Ci[e];if(!n)continue;const{isEnabled:s,Feature:o}=n;if(!this.features[e]&&o&&s(this.props)&&(this.features[e]=new o(this)),this.features[e]){const l=this.features[e];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ze()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<_0.length;s++){const o=_0[s];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const l="on"+o,u=e[l];u&&(this.propEventSubscriptions[o]=this.on(o,u))}this.prevMotionValues=vL(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=$o(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let o=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return o!=null&&(typeof o=="string"&&(W1(o)||L1(o))?o=parseFloat(o):!yL(o)&&Vr.test(n)&&(o=U1(e,n)),this.setBaseTarget(e,kt(o)?o.get():o)),kt(o)?o.get():o}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let o;if(typeof s=="string"||typeof s=="object"){const u=Sh(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);u&&(o=u[e])}if(s&&o!==void 0)return o;const l=this.getBaseTargetFromProps(this.props,e);return l!==void 0&&!kt(l)?l:this.initialValues[e]!==void 0&&o===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Lh),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class ES extends xL{constructor(){super(...arguments),this.KeyframeResolver=K1}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;kt(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function wL(t){return window.getComputedStyle(t)}class SL extends ES{constructor(){super(...arguments),this.type="html",this.renderInstance=u1}readValueFromInstance(e,n){if(Ns.has(n)){const s=Vh(n);return s&&s.default||0}else{const s=wL(e),o=(o1(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return dS(e,n)}build(e,n,s){_h(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ph(e,n,s)}}class bL extends ES{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ze}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ns.has(n)){const s=Vh(n);return s&&s.default||0}return n=c1.has(n)?n:vh(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return h1(e,n,s)}build(e,n,s){Ch(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,o){d1(e,n,s,o)}mount(e){this.isSVGTag=kh(e.tagName),super.mount(e)}}const EL=(t,e)=>wh(t)?new bL(e):new SL(e,{allowProjection:t!==C.Fragment}),_L=X2({...QD,...hL,...nL,...pL},EL),us=d2(_L),CL={some:0,all:1};function TL(t,e,{root:n,margin:s,amount:o="some"}={}){const l=S1(t),u=new WeakMap,d=p=>{p.forEach(g=>{const y=u.get(g.target);if(g.isIntersecting!==!!y)if(g.isIntersecting){const w=e(g);typeof w=="function"?u.set(g.target,w):f.unobserve(g.target)}else typeof y=="function"&&(y(g),u.delete(g.target))})},f=new IntersectionObserver(d,{root:n,rootMargin:s,threshold:typeof o=="number"?o:CL[o]});return l.forEach(p=>f.observe(p)),()=>f.disconnect()}function _S(t,{root:e,margin:n,amount:s,once:o=!1}={}){const[l,u]=C.useState(!1);return C.useEffect(()=>{if(!t.current||o&&l)return;const d=()=>(u(!0),o?void 0:()=>u(!1)),f={root:e&&e.current||void 0,margin:n,amount:s};return TL(t.current,d,f)},[e,t,n,o,s]),l}function kL(t){const[e,n]=C.useState(null);return C.useLayoutEffect(()=>{const s=t.current;if(!s)return;const o=s.getBoundingClientRect();n({width:o.width,height:o.height});const l=new ResizeObserver(([u])=>{const{width:d,height:f}=u.contentRect;n({width:d,height:f})});return l.observe(s),()=>l.disconnect()},[t]),e}const PL={"media.base44.com":"/images/public/","static.wixstatic.com":"/media/"},RL=1024,Gn={OPTIMIZED:"optimized",ORIGINAL:"original",FALLBACK:"fallback"},AL=[1,2,3],NL=6e3;function OL(t){try{const e=new URL(t);if(e.protocol!=="https:"||e.username||e.password||e.port&&e.port!=="443")return null;const n=PL[e.hostname];if(!n)return null;const s=e.pathname.match(/^(.*)\/v1\/(?:fill|fit)\/[^/]+\/[^/]+$/i),o=s?s[1]:e.pathname,l=o.split("/").pop();return!o.startsWith(n)||!l||!/\.[a-z0-9]+$/i.test(l)||/\.svg$/i.test(l)?null:{baseUrl:`${e.origin}${o}`,filename:l}}catch{return null}}const C0=t=>Math.min(Math.max(Math.round(t),1),NL),T0=t=>Math.min(1,Math.max(0,t));function Mf({baseUrl:t,filename:e},{width:n,height:s,crop:o,focalPoint:l,quality:u}){const d=[`w_${C0(n)}`,`h_${C0(s||n)}`];o&&d.push(l?`fp_${T0(l.x).toFixed(2)}_${T0(l.y).toFixed(2)}`:"al_c"),d.push(`q_${u}`,"usm_0.66_1.00_0.01","enc_webp","quality_auto");const f=/\.gif$/i.test(e)?e:e.replace(/\.[a-z0-9]+$/i,"")+".webp";return`${t}/v1/${o?"fill":"fit"}/${d.join(",")}/${f}`}function DL(t,e){return AL.map(n=>`${Mf(t,{...e,width:e.width*n,height:e.height?e.height*n:void 0})} ${n}x`).join(", ")}function jL(t,e){return(e==null?void 0:e.baseUrl)||t}function LL(t){return t===Gn.OPTIMIZED?Gn.ORIGINAL:Gn.FALLBACK}const Fd="https://static.wixstatic.com/media/12d367_4f26ccd17f8f4e3a8958306ea08c2332~mv2.png",CS=C.forwardRef(({aspectRatio:t,className:e,style:n,children:s},o)=>v.jsx("span",{ref:o,className:Br("inline-block relative",e),style:{aspectRatio:t,...n},children:s}));CS.displayName="ImageWrapper";const TS=C.forwardRef(({parsed:t,fittingType:e,focalPoint:n,quality:s,className:o,style:l,aspectRatio:u,onLoad:d,...f},p)=>{const g=C.useRef(null),y=C.useRef(null),w=kL(g),[_,P]=C.useState(!1);C.useImperativeHandle(p,()=>y.current),C.useEffect(()=>{P(!1)},[t.baseUrl]);const E=e!=="fit",S=w&&{width:w.width||RL,height:w.height?w.height:void 0,crop:E,focalPoint:E?n:void 0,quality:s};return v.jsxs(CS,{ref:g,aspectRatio:u,className:o,style:l,children:[S&&!_&&v.jsx("img",{src:Mf(t,{...S,width:20,height:S.height?Math.max(1,Math.round(20*S.height/S.width)):void 0,quality:20}),alt:"","aria-hidden":"true",className:"w-full h-full inset-0 absolute",style:{objectFit:e==="fit"?"contain":"cover",filter:"blur(10px)",transform:"scale(1.1)"}}),S&&v.jsx("img",{ref:y,src:Mf(t,S),srcSet:DL(t,S),loading:"lazy",className:Br("w-full h-full inset-0 absolute",e==="fit"?"object-contain":"object-cover"),onLoad:b=>{P(!0),d==null||d(b)},...f})]})});TS.displayName="ResponsiveImage";const Hh=C.forwardRef(({src:t,fittingType:e="fill",originWidth:n,originHeight:s,focalPointX:o,focalPointY:l,quality:u=90,onError:d,...f},p)=>{const g=t&&t!==Fd?OL(t):null,y=g?Gn.OPTIMIZED:Gn.ORIGINAL,[w,_]=C.useState({src:t,mode:y}),P=w.src===t?w.mode:y;C.useEffect(()=>{_({src:t,mode:y})},[t,y]);const S={...f,onError:N=>{if(P===Gn.FALLBACK)return;const F=LL(P);_({src:t,mode:F}),F===Gn.FALLBACK&&(d==null||d(N))}};if(!t)return v.jsx("img",{ref:p,src:Fd,...S,"data-empty-image":!0});const b=P===Gn.OPTIMIZED?g:null;if(!b){const N=P===Gn.FALLBACK,F=N?Fd:jL(t,g);return v.jsx("img",{ref:p,src:F,...S,"data-error-image":N||void 0})}const R=typeof o=="number"&&typeof l=="number"?{x:o,y:l}:void 0,k=n&&s?`${n} / ${s}`:void 0;return v.jsx(TS,{ref:p,parsed:b,fittingType:e,focalPoint:R,quality:u,aspectRatio:k,...S})});Hh.displayName="Image";const ML="https://media.base44.com/images/public/6a7b06f6e9ea2a4e5becefb4/59fda11c0_generated_182a6e88.png",zd=[.16,1,.3,1];function IL(){return v.jsxs("section",{className:"relative min-h-[600px] md:min-h-[700px] max-h-[900px] h-[100vh] bg-alrazah-navy overflow-hidden flex items-center",children:[v.jsxs("div",{className:"absolute inset-0 z-0",children:[v.jsx(Hh,{src:ML,alt:"Aerial view of Alrazah Holding's completed commercial development in Doha, Qatar, showcasing modern architecture at dusk",className:"block w-full h-full",fittingType:"fill"}),v.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(180deg, rgba(10,22,40,0.70) 0%, rgba(10,22,40,0.85) 60%, rgba(10,22,40,0.95) 100%)"}})]}),v.jsx("div",{className:"absolute inset-0 alrazah-mashrabiya opacity-[0.04] z-[1] pointer-events-none"}),v.jsxs("div",{className:"relative z-[2] mx-auto max-w-[1200px] px-5 md:px-8 lg:px-16 w-full pt-24",style:{transform:"translateY(-5vh)"},children:[v.jsx(us.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2,ease:zd},className:"text-[11px] font-bold uppercase tracking-[0.12em] text-alrazah-gold mb-6",children:"Project Management Excellence"}),v.jsx(us.h1,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:1,delay:.4,ease:zd},className:"font-display text-[40px] md:text-[56px] lg:text-[72px] leading-[1.05] tracking-[-0.02em] text-white mb-8 max-w-[900px] text-balance",children:"Delivery Standards That Define Qatar's Built Environment"}),v.jsx(us.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.6,ease:zd},className:"text-[16px] md:text-[18px] leading-[1.7] text-white/80 mb-12 max-w-[680px]",children:"At Alrazah Holding, project delivery is not merely a process — it is a covenant of excellence. Our standards govern every phase of development, from initial concept through final handover, ensuring that every structure we deliver meets the rigorous demands of Qatar's most ambitious vision."}),v.jsxs(us.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.6,delay:.8},className:"flex flex-col sm:flex-row gap-4",children:[v.jsx("a",{href:"#framework",className:"inline-flex items-center justify-center bg-alrazah-gold text-alrazah-navy text-[14px] font-semibold uppercase tracking-[0.06em] px-10 py-4 rounded-[2px] hover:bg-alrazah-warm-gold hover:-translate-y-0.5 hover:shadow-[0_16px_48px_rgba(10,22,40,0.14)] transition-all duration-[250ms]",children:"Explore Our Framework"}),v.jsx("a",{href:"#evidence",className:"inline-flex items-center justify-center bg-transparent border border-white/40 text-white text-[14px] font-semibold uppercase tracking-[0.06em] px-10 py-4 rounded-[2px] hover:bg-white/10 hover:border-white/60 transition-all duration-[250ms]",children:"View Delivered Projects"})]})]}),v.jsxs("div",{className:"absolute bottom-8 left-1/2 -translate-x-1/2 z-[2] flex flex-col items-center gap-2",children:[v.jsx(us.span,{animate:{opacity:[.4,1,.4]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"block w-px h-10 bg-white"}),v.jsx("span",{className:"text-[12px] uppercase tracking-[0.08em] text-white/60",children:"Scroll"})]})]})}const FL=[.16,1,.3,1];function nt({children:t,className:e,delay:n=0,y:s=20,x:o=0,once:l=!0,as:u="div"}){const d=us[u]||us.div;return v.jsx(d,{className:e,initial:{opacity:0,y:s,x:o},whileInView:{opacity:1,y:0,x:0},viewport:{once:l,amount:.15},transition:{duration:.6,delay:n,ease:FL},children:t})}const zL=[{icon:eC,title:"Precision Without Compromise",body:"Every measurement verified. Every specification validated. Our tolerance for deviation is zero, because Qatar’s infrastructure demands nothing less."},{icon:yx,title:"Accountability at Every Stage",body:"From project director to site engineer, every team member carries defined accountability metrics. Our governance structure ensures that responsibility is never ambiguous and performance is always measurable."},{icon:cC,title:"Sustainability as Standard",body:"Environmental compliance is not an add-on — it is embedded in our baseline specifications. Every Alrazah project aligns with Qatar National Vision 2030 sustainability targets and GSAS certification requirements."}];function VL(){return v.jsx("section",{className:"bg-alrazah-pearl border-b border-alrazah-border-light py-16 md:py-24",children:v.jsxs("div",{className:"mx-auto max-w-[1200px] px-5 md:px-8 lg:px-16 grid lg:grid-cols-[40%_60%] gap-12 lg:gap-16",children:[v.jsxs(nt,{x:-30,duration:.8,children:[v.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.12em] text-alrazah-gold mb-4",children:"Our Commitment"}),v.jsx("h2",{className:"font-display text-[28px] leading-[1.2] text-alrazah-navy mb-6 text-balance",children:"A Philosophy Engineered for Excellence"}),v.jsx("p",{className:"text-[18px] leading-[1.7] text-alrazah-text-secondary mb-6 max-w-[55ch]",children:"Alrazah Holding's project management division operates under a singular mandate: to deliver assets that exceed stakeholder expectations while advancing Qatar's national development objectives. Our delivery standards are not checklists — they are the architectural DNA of every project we undertake."}),v.jsx("p",{className:"text-[16px] leading-[1.7] text-alrazah-text-secondary mb-8 max-w-[55ch]",children:"Drawing from international best practices in construction management, lean methodology, and total quality management, we have developed a proprietary delivery framework that integrates technical precision with cultural sensitivity. Every standard we enforce reflects our understanding that in Qatar, construction is not merely development — it is legacy."}),v.jsxs("div",{className:"flex items-center gap-4",children:[v.jsx("span",{className:"block w-[60px] h-[2px] bg-alrazah-gold"}),v.jsx("span",{className:"text-[12px] font-semibold uppercase tracking-[0.04em] text-alrazah-navy",children:"Engineering Trust, Delivering Legacy"})]})]}),v.jsx("div",{className:"flex flex-col gap-6",children:zL.map((t,e)=>{const n=t.icon;return v.jsx(nt,{delay:.15*e,y:40,className:"group bg-white border border-alrazah-border-light rounded-[4px] p-8 transition-all duration-300 ease-out hover:-translate-y-1 hover:shadow-[0_8px_24px_rgba(10,22,40,0.12)] hover:border-alrazah-limestone",children:v.jsxs("div",{className:"flex items-start gap-5",children:[v.jsx("span",{className:"shrink-0 w-14 h-14 rounded-[4px] bg-alrazah-pearl flex items-center justify-center group-hover:bg-alrazah-gold/10 transition-colors",children:v.jsx(n,{className:"w-8 h-8 text-alrazah-gold",strokeWidth:1.5})}),v.jsxs("div",{children:[v.jsx("h3",{className:"text-[20px] font-semibold text-alrazah-navy mb-3",children:t.title}),v.jsx("p",{className:"text-[14px] leading-[1.7] text-alrazah-text-secondary",children:t.body})]})]})},t.title)})})]})})}const UL=[{n:"01",icon:EC,title:"Strategic Planning & Feasibility",desc:"Before ground is broken, every Alrazah project undergoes rigorous feasibility analysis, risk assessment, and stakeholder alignment. Our planning phase integrates market intelligence, regulatory mapping, and financial modeling to ensure project viability.",metrics:[{v:"100%",l:"Feasibility Coverage"},{v:"Q3",l:"Avg. Planning Duration"}]},{n:"02",icon:gC,title:"Design Excellence & Innovation",desc:"Our design standards mandate collaboration between international architectural consultants and local engineering expertise. Every design is reviewed against GSAS sustainability criteria, accessibility standards, and cultural contextual requirements.",metrics:[{v:"GSAS",l:"Certification Target"},{v:"100%",l:"Local Content Integration"}]},{n:"03",icon:oC,title:"Construction Governance",desc:"On-site execution is governed by our proprietary Construction Management Protocol (CMP), which mandates daily reporting, weekly safety audits, monthly quality reviews, and continuous environmental monitoring.",metrics:[{v:"Zero",l:"Safety Tolerance"},{v:"Weekly",l:"Quality Reviews"}]},{n:"04",icon:lC,title:"Handover & Lifecycle Support",desc:"Project completion triggers a structured 12-month defect liability period with dedicated support teams. We provide comprehensive operations manuals, staff training, and ongoing asset management advisory.",metrics:[{v:"12 Mo",l:"Defect Liability"},{v:"100%",l:"Documentation Delivery"}]}];function BL(){return v.jsx("section",{className:"bg-white py-16 md:py-24",children:v.jsxs("div",{className:"mx-auto max-w-[1200px] px-5 md:px-8 lg:px-16",children:[v.jsx("div",{className:"text-center max-w-[640px] mx-auto mb-12 md:mb-16",children:v.jsxs(nt,{children:[v.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.12em] text-alrazah-gold mb-4",children:"Our Framework"}),v.jsx("h2",{className:"font-display text-[40px] leading-[1.15] text-alrazah-navy mb-5 text-balance",children:"The Four Pillars of Delivery Excellence"}),v.jsx("p",{className:"text-[18px] leading-[1.7] text-alrazah-text-secondary",children:"Our delivery methodology rests on four interdependent pillars that govern every project from inception to handover."})]})}),v.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 md:gap-8",children:UL.map((t,e)=>{const n=t.icon;return v.jsxs(nt,{delay:.12*e,y:40,className:"group relative bg-alrazah-pearl border-t-4 border-alrazah-gold rounded-b-[4px] rounded-t-none px-8 py-10 transition-all duration-300 ease-out hover:bg-white hover:shadow-[0_8px_24px_rgba(10,22,40,0.12)] hover:border-alrazah-warm-gold",children:[v.jsx("span",{className:"absolute top-6 right-6 font-display text-[56px] leading-none text-alrazah-gold/30 transition-all duration-[400ms] ease-out group-hover:text-alrazah-gold/50 group-hover:scale-105",children:t.n}),v.jsx("span",{className:"block w-12 h-12 text-alrazah-royal mb-6",children:v.jsx(n,{className:"w-12 h-12",strokeWidth:1.5})}),v.jsx("h3",{className:"text-[24px] font-semibold text-alrazah-navy mb-4 leading-tight",children:t.title}),v.jsx("p",{className:"text-[14px] leading-[1.7] text-alrazah-text-secondary mb-6",children:t.desc}),v.jsx("div",{className:"flex items-center gap-4",children:t.metrics.map((s,o)=>v.jsxs("div",{className:"flex items-center gap-4",children:[o>0&&v.jsx("span",{className:"h-6 w-px bg-alrazah-border-light"}),v.jsxs("div",{children:[v.jsx("div",{className:"text-[20px] font-semibold text-alrazah-gold font-display leading-none",children:s.v}),v.jsx("div",{className:"text-[12px] uppercase tracking-[0.04em] text-alrazah-text-tertiary mt-1",children:s.l})]})]},s.l))})]},t.n)})})]})})}const $L=["Standard Category","Alrazah Minimum","Industry Benchmark","Regulatory Requirement","Compliance Verification"],WL=[["Structural Integrity","150% of QCS load requirements","100% of QCS requirements","QCS 2014 + ASCE 7-16","Third-party structural audit"],["Fire Safety Systems","NFPA 101 + QCDD dual compliance","QCDD minimum standards","QCDD Fire Code 2023","Certified fire engineer sign-off"],["Accessibility Standards","Full ADA + Qatari accessibility mandate","Basic ramp/access compliance","Qatari Law No. 2 of 1987 (as amended)","Accessibility audit pre-handover"],["Environmental Compliance","GSAS 2-Star minimum, 3-Star target","Environmental permit compliance","Ministry of Municipality & Environment","GSAS third-party assessment"],["Material Quality","ISO 9001 certified suppliers only","Commercial-grade materials","Qatari Construction Specifications","Material testing laboratory reports"],["Workforce Safety","Zero lost-time incidents target","OSHA-recordable rate < 3.0","Qatar Labor Law + OSHA 1926","Monthly safety audit + reporting"],["Quality Assurance","Six Sigma methodology, 3.4 DPMO","Standard QC inspections","ISO 9001:2015","Internal + external QA audits"],["Project Documentation","BIM Level 2 + digital twin mandate","2D as-built drawings","Qatari building permit requirements","Digital asset handover package"],["Energy Performance","30% below ASHRAE 90.1 baseline","Code-minimum energy compliance","ASHRAE 90.1-2019 / GSAS","Energy modeling + commissioning"],["Water Efficiency","40% reduction vs. baseline","Fixture efficiency compliance","Qatar Water Management Standards","Water audit + metering verification"],["Waste Management","75% diversion from landfill","Basic waste segregation","MME Waste Management Regulations","Monthly waste audit reports"],["Handover Standards","12-month DLP + full O&M manuals","Standard 6-month DLP","Qatari Civil Code Article 634","Independent snagging inspection"]];function HL(){return v.jsxs("section",{className:"bg-alrazah-navy py-20 md:py-32 text-white relative overflow-hidden",children:[v.jsx("div",{className:"absolute inset-0 alrazah-mashrabiya opacity-[0.04] pointer-events-none"}),v.jsxs("div",{className:"mx-auto max-w-[1200px] px-5 md:px-8 lg:px-16 relative",children:[v.jsxs(nt,{className:"mb-12 md:mb-16",children:[v.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.12em] text-alrazah-gold mb-4",children:"Technical Standards"}),v.jsx("h2",{className:"font-display text-[40px] md:text-[56px] leading-[1.1] mb-5 text-balance",children:"The Standards Matrix"}),v.jsx("p",{className:"text-[18px] leading-[1.7] text-white/75 max-w-[700px]",children:"Our technical specifications exceed industry benchmarks across every measurable dimension. The matrix below defines the non-negotiable standards that govern Alrazah project delivery."})]}),v.jsx(nt,{delay:.3,className:"overflow-hidden rounded-[4px] border border-white/10 bg-white/[0.03]",children:v.jsx("div",{className:"overflow-x-auto",children:v.jsxs("table",{className:"w-full min-w-[800px] border-collapse",children:[v.jsx("thead",{children:v.jsx("tr",{className:"bg-white/[0.06]",children:$L.map(t=>v.jsx("th",{className:"text-left text-[12px] md:text-[14px] uppercase font-bold tracking-[0.04em] text-white px-6 py-4 border-b border-white/10 whitespace-nowrap",children:t},t))})}),v.jsx("tbody",{children:WL.map((t,e)=>v.jsxs("tr",{className:`group transition-colors duration-150 hover:bg-white/[0.06] ${e%2?"bg-white/[0.02]":""} relative`,children:[v.jsxs("td",{className:"px-6 py-4 text-[14px] text-white font-medium border-b border-white/[0.06] sticky left-0 bg-alrazah-navy/95 md:static md:bg-transparent whitespace-nowrap",children:[v.jsx("span",{className:"absolute left-0 top-0 bottom-0 w-[2px] bg-transparent group-hover:bg-alrazah-gold transition-colors"}),t[0]]}),v.jsx("td",{className:"px-6 py-4 text-[14px] text-white/90 border-b border-white/[0.06]",children:t[1]}),v.jsx("td",{className:"px-6 py-4 text-[14px] text-white/60 border-b border-white/[0.06]",children:t[2]}),v.jsx("td",{className:"px-6 py-4 text-[14px] text-white/75 border-b border-white/[0.06]",children:t[3]}),v.jsx("td",{className:"px-6 py-4 text-[14px] text-white/85 border-b border-white/[0.06]",children:t[4]})]},t[0]))})]})})}),v.jsx("p",{className:"mt-6 text-[12px] italic text-white/50 max-w-[80ch]",children:"All standards are subject to continuous review and are updated quarterly to reflect evolving regulatory requirements and industry best practices."})]})]})}const qL=[{n:"01",icon:vC,title:"Internal Audit Protocol",desc:"Our internal audit team conducts unannounced inspections at minimum weekly intervals. Each audit covers safety compliance, material verification, workmanship quality, and schedule adherence. Findings are escalated to project leadership within 24 hours.",features:["Weekly unannounced site audits","24-hour escalation protocol","Digital audit trail documentation"]},{n:"02",icon:W_,title:"Third-Party Verification",desc:"Every Alrazah project engages independent verification agencies at three critical milestones: foundation completion, structural topping, and final handover. These agencies are selected from Qatar’s approved consultant list and operate without Alrazah oversight to ensure impartiality.",features:["Milestone-based independent review","Qatar-approved consultant panel","Impartial reporting to stakeholders"]},{n:"03",icon:kC,title:"Stakeholder Governance",desc:"Project governance committees meet bi-weekly with representatives from Alrazah leadership, project management, design consultants, and key subcontractors. These forums ensure transparent decision-making and rapid issue resolution.",features:["Bi-weekly governance forums","Cross-functional representation","Real-time issue resolution tracking"]}];function QL(){return v.jsx("section",{className:"bg-alrazah-pearl py-16 md:py-24",children:v.jsxs("div",{className:"mx-auto max-w-[1200px] px-5 md:px-8 lg:px-16",children:[v.jsx("div",{className:"text-center max-w-[680px] mx-auto mb-12 md:mb-16",children:v.jsxs(nt,{children:[v.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.12em] text-alrazah-gold mb-4",children:"Quality Assurance"}),v.jsx("h2",{className:"font-display text-[40px] leading-[1.15] text-alrazah-navy mb-5 text-balance",children:"Verification at Every Vector"}),v.jsx("p",{className:"text-[18px] leading-[1.7] text-alrazah-text-secondary",children:"Our quality assurance engine operates through three integrated control systems that monitor, verify, and validate every project parameter in real time."})]})}),v.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:qL.map((t,e)=>{const n=t.icon;return v.jsxs(nt,{delay:.15*e,y:50,className:"group relative bg-white border border-alrazah-border-light rounded-[4px] p-10 transition-all duration-[350ms] ease-out hover:-translate-y-1.5 hover:shadow-[0_16px_48px_rgba(10,22,40,0.14)]",children:[v.jsx("span",{className:"absolute top-8 right-8 font-display text-[40px] leading-none text-alrazah-gold/20",children:t.n}),v.jsx("span",{className:"block text-alrazah-royal mb-6",children:v.jsx(n,{className:"w-10 h-10",strokeWidth:1.5})}),v.jsx("h3",{className:"text-[24px] font-semibold text-alrazah-navy mb-4",children:t.title}),v.jsx("p",{className:"text-[14px] leading-[1.7] text-alrazah-text-secondary mb-6",children:t.desc}),v.jsx("ul",{className:"flex flex-col gap-3",children:t.features.map(s=>v.jsxs("li",{className:"flex items-start gap-3 text-[14px] text-alrazah-text-secondary",children:[v.jsx("span",{className:"mt-1.5 block w-1.5 h-1.5 bg-alrazah-gold shrink-0"}),s]},s))})]},t.n)})})]})})}const Vd=[{n:"01",title:"Concept & Feasibility",dur:"Weeks 1–8",desc:"Market analysis, site assessment, regulatory mapping, and financial modeling to establish project viability.",del:["Feasibility Report","Risk Assessment","Budget Framework"]},{n:"02",title:"Design & Approval",dur:"Months 2–6",desc:"Architectural design, engineering specifications, GSAS compliance planning, and authority approvals.",del:["Design Drawings","GSAS Application","Permit Package"]},{n:"03",title:"Procurement & Mobilization",dur:"Months 6–9",desc:"Contractor selection, material procurement, site preparation, and team mobilization.",del:["Contract Awards","Material Schedules","Site Setup"]},{n:"04",title:"Construction & Monitoring",dur:"Months 9–24",desc:"Core construction phase with continuous quality monitoring, safety audits, and progress reporting.",del:["Weekly Reports","Milestone Reviews","Safety Audits"]},{n:"05",title:"Testing & Commissioning",dur:"Months 24–27",desc:"Systems testing, defect rectification, performance verification, and authority inspections.",del:["Commissioning Reports","Snagging List","Authority NOCs"]},{n:"06",title:"Handover & Support",dur:"Month 27+",desc:"Formal handover, documentation package, staff training, and 12-month defect liability period.",del:["O&M Manuals","Training Program","DLP Coverage"]}];function KL({phase:t,index:e,active:n}){return v.jsxs("div",{className:"relative flex md:flex-col items-center md:text-center gap-4 md:gap-0 md:items-start md:flex-1",children:[v.jsx("div",{className:`relative z-10 shrink-0 w-12 h-12 rounded-full border-2 flex items-center justify-center font-display text-[20px] font-semibold transition-all duration-[400ms] ease-out ${n?"bg-alrazah-gold border-alrazah-gold text-white":"bg-white border-alrazah-gold text-alrazah-gold"}`,children:t.n}),v.jsxs("div",{className:"md:mt-6 md:px-2",children:[v.jsx("h3",{className:`text-[20px] font-semibold leading-tight transition-colors duration-300 ${n?"text-alrazah-royal":"text-alrazah-navy"}`,children:t.title}),v.jsx("p",{className:"text-[12px] uppercase tracking-[0.08em] text-alrazah-gold mt-2",children:t.dur}),v.jsx("p",{className:"text-[14px] leading-[1.6] text-alrazah-text-secondary mt-3 md:max-w-[200px] md:mx-auto",children:t.desc}),v.jsx("ul",{className:"mt-4 flex flex-col gap-1.5 md:items-center md:justify-center",children:t.del.map(s=>v.jsxs("li",{className:"flex items-center gap-2 text-[12px] text-alrazah-text-tertiary",children:[v.jsx("span",{className:"block w-1 h-1 bg-alrazah-gold shrink-0"}),s]},s))})]})]})}function GL(){const t=C.useRef(null),e=_S(t,{once:!0,amount:.2}),[n,s]=C.useState(0);C.useEffect(()=>{if(!e)return;let l;const u=performance.now(),d=1800,f=p=>{const g=Math.min((p-u)/d,1);s(g),g<1&&(l=requestAnimationFrame(f))};return l=requestAnimationFrame(f),()=>cancelAnimationFrame(l)},[e]);const o=Math.round(n*Vd.length);return v.jsx("section",{className:"bg-white border-b border-alrazah-border-light py-16 md:py-24",children:v.jsxs("div",{className:"mx-auto max-w-[1200px] px-5 md:px-8 lg:px-16",ref:t,children:[v.jsx("div",{className:"text-center max-w-[680px] mx-auto mb-16",children:v.jsxs(nt,{children:[v.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.12em] text-alrazah-gold mb-4",children:"Project Lifecycle"}),v.jsx("h2",{className:"font-display text-[40px] leading-[1.15] text-alrazah-navy mb-5 text-balance",children:"From Concept to Completion"}),v.jsx("p",{className:"text-[18px] leading-[1.7] text-alrazah-text-secondary",children:"Our delivery lifecycle follows a rigorously defined six-phase methodology that ensures consistency, transparency, and accountability across every project scale."})]})}),v.jsxs("div",{className:"hidden md:block relative",children:[v.jsx("div",{className:"absolute top-6 left-0 right-0 h-[2px] bg-alrazah-gold/30"}),v.jsx("div",{className:"absolute top-6 left-0 h-[2px] bg-alrazah-gold origin-left",style:{width:`${n*100}%`}}),v.jsx("div",{className:"relative flex justify-between gap-4",children:Vd.map((l,u)=>v.jsx("div",{className:"flex-1 flex justify-center",children:v.jsxs("div",{className:"w-full max-w-[200px]",children:[v.jsx("div",{className:"flex justify-center",children:v.jsx("div",{className:`z-10 w-12 h-12 rounded-full border-2 flex items-center justify-center font-display text-[20px] font-semibold transition-all duration-[400ms] ease-out ${uv.jsxs("li",{className:"flex items-center gap-2 text-[12px] text-alrazah-text-tertiary",children:[v.jsx("span",{className:"block w-1 h-1 bg-alrazah-gold"}),d]},d))})]})},l.n))})]}),v.jsxs("div",{className:"md:hidden relative pl-2",children:[v.jsx("div",{className:"absolute left-8 top-0 bottom-0 w-[2px] bg-alrazah-gold/30"}),v.jsx("div",{className:"space-y-12",children:Vd.map((l,u)=>v.jsx(KL,{phase:l,index:u,active:u{if(!o)return;const d=XL(t);if(!d){u(t);return}const f=performance.now(),{num:p,suffix:g}=d;let y;const w=_=>{const P=Math.min((_-f)/(e*1e3),1),E=1-Math.pow(1-P,3),S=p*E,b=String(p).includes(".")?1:0;u(`${S.toFixed(b)}${g}`),P<1?y=requestAnimationFrame(w):u(`${p}${g}`)};return y=requestAnimationFrame(w),()=>cancelAnimationFrame(y)},[o,t,e]),v.jsx("span",{ref:s,className:n,children:l})}const k0=[{v:"2.4M+",l:"Sq. M. Delivered",c:"Commercial, residential & industrial"},{v:"100%",l:"On-Time Delivery",c:"Average variance: plus/minus 2 days"},{v:"Zero",l:"Major Safety Incidents",c:"Last 36 months"},{v:"12",l:"Active Projects",c:"Under various delivery phases"}],JL=[{cat:"Logistics & Industrial",title:"Al Wukair Logistics Complex",desc:"A 180,000 sq.m. state-of-the-art logistics hub featuring automated warehousing, cold storage facilities, and integrated distribution infrastructure serving Qatar’s growing supply chain sector.",meta:["Value: QAR 340M","Duration: 18 months","Status: Operational"],img:"https://media.base44.com/images/public/6a7b06f6e9ea2a4e5becefb4/a1ddf5a9e_generated_4d020abc.png",alt:"Al Wukair Logistics Complex — Logistics & Industrial developed by Alrazah Holding in Al Wukair, Qatar"},{cat:"Commercial Real Estate",title:"Lusail Business District Tower",desc:"A 28-story Grade-A commercial tower in the heart of Lusail City, featuring smart building systems, GSAS 3-Star sustainability certification, and 45,000 sq.m. of leasable space.",meta:["Value: QAR 520M","Duration: 30 months","Status: Completed"],img:"https://media.base44.com/images/public/6a7b06f6e9ea2a4e5becefb4/ccadda3d1_generated_ff2ecc0a.png",alt:"Lusail Business District Tower — Commercial Real Estate developed by Alrazah Holding in Lusail, Qatar"},{cat:"Residential Development",title:"The Pearl Residences — Phase II",desc:"Luxury waterfront residential development comprising 120 premium apartments with full marina access, integrated retail, and landscaped communal spaces.",meta:["Value: QAR 280M","Duration: 24 months","Status: Completed"],img:"https://media.base44.com/images/public/6a7b06f6e9ea2a4e5becefb4/04115b171_generated_29391208.png",alt:"The Pearl Residences Phase II — Residential Development developed by Alrazah Holding at The Pearl, Qatar"}];function ZL(){return v.jsx("section",{id:"evidence",className:"bg-alrazah-pearl py-16 md:py-24",children:v.jsxs("div",{className:"mx-auto max-w-[1200px] px-5 md:px-8 lg:px-16",children:[v.jsxs(nt,{className:"mb-12 md:mb-16",children:[v.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.12em] text-alrazah-gold mb-4",children:"Proven Performance"}),v.jsx("h2",{className:"font-display text-[40px] md:text-[56px] leading-[1.1] text-alrazah-navy mb-5 text-balance",children:"Evidence of Excellence"}),v.jsx("p",{className:"text-[18px] leading-[1.7] text-alrazah-text-secondary max-w-[680px]",children:"Our track record is measured not in promises, but in completed assets that continue to serve Qatar\\u2019s economic and social infrastructure."})]}),v.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 border border-alrazah-border-light rounded-[4px] overflow-hidden bg-white mb-12 md:mb-16",children:k0.map((t,e)=>v.jsxs(nt,{delay:.1*e,className:`text-center px-8 py-12 ${e!==k0.length-1?"sm:border-r border-alrazah-border-light":""} ${e<2?"sm:border-b lg:border-b-0":""}`,children:[v.jsx("div",{className:"font-display text-[40px] md:text-[56px] leading-[1.1] text-alrazah-gold",children:v.jsx(YL,{value:t.v})}),v.jsx("div",{className:"text-[16px] font-semibold uppercase tracking-[0.04em] text-alrazah-navy mt-4",children:t.l}),v.jsx("div",{className:"text-[14px] text-alrazah-text-tertiary mt-2",children:t.c})]},t.l))}),v.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:JL.map((t,e)=>v.jsxs(nt,{delay:.12*e,y:40,className:"group bg-white border border-alrazah-border-light rounded-[4px] overflow-hidden hover:shadow-[0_8px_24px_rgba(10,22,40,0.12)] transition-all duration-300",children:[v.jsx("div",{className:"aspect-video overflow-hidden",children:v.jsx(Hh,{src:t.img,alt:t.alt,className:"block w-full h-full grayscale group-hover:grayscale-0 scale-100 group-hover:scale-105 transition-all duration-[600ms] ease-out",fittingType:"fill"})}),v.jsxs("div",{className:"p-8",children:[v.jsx("p",{className:"text-[12px] uppercase tracking-[0.08em] text-alrazah-gold font-medium mb-3",children:t.cat}),v.jsx("h3",{className:"text-[24px] font-semibold text-alrazah-navy mb-3 leading-tight",children:t.title}),v.jsx("p",{className:"text-[14px] leading-[1.6] text-alrazah-text-secondary mb-5 line-clamp-3",children:t.desc}),v.jsx("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 mb-6",children:t.meta.map((n,s)=>v.jsxs("span",{className:"flex items-center gap-3 text-[12px] text-alrazah-text-tertiary",children:[s>0&&v.jsx("span",{className:"h-4 w-px bg-alrazah-border-light"}),n]},n))}),v.jsxs("a",{href:"#",className:"group/link inline-flex items-center gap-2 text-[14px] font-medium text-alrazah-royal",children:["View Project Details",v.jsx("span",{className:"transition-transform duration-200 group-hover/link:translate-x-1",children:"→"})]})]})]},t.title))})]})})}const eM=["ISO 9001","ISO 14001","OHSAS 18001","GSAS Certified"],tM={left:{icon:q_,title:"Corporate Governance Framework",body:"Alrazah Holding adheres to the Qatar Financial Markets Authority (QFMA) Corporate Governance Code and the Qatar Stock Exchange ESG Disclosure Guidelines. Our Board of Directors maintains independent oversight through dedicated Audit, Risk, and Nomination committees.",features:["QFMA Corporate Governance Code compliance","Independent Board committee structure","Quarterly governance disclosure reports","Annual external governance audit"],cta:"Download Governance Report"},right:{icon:nC,title:"Regulatory Compliance Matrix",body:"Our project management operations maintain active compliance with all Qatari regulatory bodies including the Ministry of Municipality and Environment (MME), Qatar Civil Defence Department (QCDD), and the General Authority of Customs.",features:["MME building permit & environmental compliance","QCDD fire safety & life safety approval","Qatar General Electricity & Water Corporation (Kahramaa) standards","Qatar Construction Specifications (QCS) 2014 adherence"],cta:"View Compliance Certificates"}};function nM(){return v.jsx("section",{className:"bg-white border-b border-alrazah-border-light py-16 md:py-24",children:v.jsxs("div",{className:"mx-auto max-w-[1200px] px-5 md:px-8 lg:px-16",children:[v.jsx("div",{className:"text-center max-w-[720px] mx-auto mb-12 md:mb-16",children:v.jsxs(nt,{children:[v.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.12em] text-alrazah-gold mb-4",children:"Governance"}),v.jsx("h2",{className:"font-display text-[40px] leading-[1.15] text-alrazah-navy mb-5 text-balance",children:"Regulatory Alignment & Certifications"}),v.jsx("p",{className:"text-[18px] leading-[1.7] text-alrazah-text-secondary",children:"As a publicly listed entity on the Qatar Stock Exchange, Alrazah Holding maintains the highest standards of regulatory compliance, corporate governance, and industry certification."})]})}),v.jsx(nt,{className:"bg-alrazah-pearl rounded-[4px] py-12 px-6 md:px-16 mb-12 md:mb-16",children:v.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8 items-center justify-items-center",children:eM.map(t=>v.jsx("div",{className:"group flex flex-col items-center justify-center text-center",children:v.jsx("div",{className:"w-[120px] h-16 border border-alrazah-limestone/60 rounded-[4px] flex items-center justify-center bg-white/50 grayscale group-hover:grayscale-0 transition-all duration-300",children:v.jsx("span",{className:"font-display text-[15px] md:text-[17px] text-alrazah-slate/80 group-hover:text-alrazah-navy transition-colors px-2 text-center leading-tight",children:t})})},t))})}),v.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 lg:gap-16",children:Object.entries(tM).map(([t,e],n)=>{const s=e.icon;return v.jsxs(nt,{x:n===0?-30:30,duration:.8,children:[v.jsx("span",{className:"block text-alrazah-royal mb-5",children:v.jsx(s,{className:"w-8 h-8",strokeWidth:1.5})}),v.jsx("h3",{className:"text-[24px] font-semibold text-alrazah-navy mb-4",children:e.title}),v.jsx("p",{className:"text-[16px] leading-[1.7] text-alrazah-text-secondary mb-6",children:e.body}),v.jsx("ul",{className:"flex flex-col gap-2.5 mb-6",children:e.features.map(o=>v.jsxs("li",{className:"flex items-start gap-3 text-[14px] text-alrazah-text-secondary",children:[v.jsx("span",{className:"mt-1.5 block w-1.5 h-1.5 bg-alrazah-gold shrink-0"}),o]},o))}),v.jsxs("a",{href:"#",className:"group inline-flex items-center gap-2 text-[14px] font-medium text-alrazah-royal",children:[e.cta,v.jsx("span",{className:"transition-transform duration-200 group-hover:translate-x-1",children:"→"})]})]},t)})})]})})}const rM=[{icon:K_,label:"QSE Listed Entity"},{icon:yx,label:"QFMA Regulated"},{icon:sC,label:"QNV 2030 Aligned"}];function sM(){return v.jsxs("section",{className:"relative bg-alrazah-navy py-20 md:py-32 text-center overflow-hidden",children:[v.jsx("div",{className:"absolute inset-0 alrazah-mashrabiya opacity-[0.04] pointer-events-none"}),v.jsx("span",{className:"pointer-events-none absolute inset-0 flex items-center justify-center font-display text-white/[0.03] text-[200px] md:text-[400px] leading-none select-none",children:"Alrazah"}),v.jsxs("div",{className:"relative mx-auto max-w-[800px] px-5 md:px-8 flex flex-col items-center",children:[v.jsx(nt,{children:v.jsx("p",{className:"text-[11px] font-bold uppercase tracking-[0.12em] text-alrazah-gold mb-6",children:"Start the Conversation"})}),v.jsx(nt,{delay:.15,children:v.jsx("h2",{className:"font-display text-[40px] md:text-[56px] leading-[1.1] text-white mb-6 text-balance",children:"Partner With Alrazah Holding"})}),v.jsx(nt,{delay:.3,children:v.jsx("p",{className:"text-[18px] leading-[1.7] text-white/80 max-w-[640px] mb-10",children:"Whether you represent an institutional investor, a development partner, or a prospective tenant, we invite you to explore how Alrazah's delivery standards can bring your vision to reality — on time, on budget, and above expectation."})}),v.jsxs(nt,{delay:.45,className:"flex flex-col sm:flex-row items-center gap-4",children:[v.jsx("a",{href:"#",className:"inline-flex items-center justify-center bg-alrazah-gold text-alrazah-navy text-[14px] font-semibold uppercase tracking-[0.06em] px-10 py-4 rounded-[2px] hover:bg-alrazah-warm-gold hover:-translate-y-0.5 hover:shadow-[0_16px_48px_rgba(10,22,40,0.14)] transition-all duration-[250ms]",children:"Schedule a Consultation"}),v.jsx("a",{href:"#",className:"inline-flex items-center justify-center bg-transparent border border-white/40 text-white text-[14px] font-semibold uppercase tracking-[0.06em] px-10 py-4 rounded-[2px] hover:bg-white/10 hover:border-white/60 transition-all duration-[250ms]",children:"Download Corporate Profile"})]}),v.jsx(nt,{delay:.6,className:"mt-12 flex flex-wrap items-center justify-center gap-x-6 gap-y-4",children:rM.map((t,e)=>{const n=t.icon;return v.jsxs("div",{className:"flex items-center gap-3",children:[e>0&&v.jsx("span",{className:"hidden sm:block w-px h-6 bg-white/20 -mr-3"}),v.jsx(n,{className:"w-4 h-4 text-white/60",strokeWidth:1.5}),v.jsx("span",{className:"text-[12px] font-semibold uppercase tracking-[0.04em] text-white/60",children:t.label})]},t.label)})})]})]})}const iM=[{title:"Our Business",links:["Real Estate","Logistics & Industrial","Asset Management","Project Management","Sustainability","Our Portfolio"]},{title:"Investor Relations",links:["Financial Reports","Annual Reports","Share Information","Corporate Governance","Investor Calendar"]},{title:"Legal & Compliance",links:["Privacy Policy","Terms of Use","Cookie Policy","Regulatory Disclosures","Whistleblowing"]}];function oM(){return v.jsx("footer",{className:"bg-alrazah-navy text-white border-t-[3px] border-alrazah-gold",children:v.jsxs("div",{className:"mx-auto max-w-[1440px] px-5 md:px-8 lg:px-16 pt-16 pb-12",children:[v.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-12 lg:gap-12",children:[v.jsxs("div",{children:[v.jsxs("div",{className:"flex items-baseline gap-2 mb-4",children:[v.jsx("span",{className:"font-display text-2xl text-white",children:"Alrazah"}),v.jsx("span",{className:"font-display text-2xl text-alrazah-gold italic",children:"Holding"})]}),v.jsx("p",{className:"text-[14px] text-white/60 mb-8",children:"Building Qatar's Future"}),v.jsxs("address",{className:"not-italic text-[14px] text-white/60 flex flex-col gap-1 mb-4",children:[v.jsx("span",{className:"text-[14px] font-semibold text-white",children:"Alrazah Holding Tower"}),v.jsx("span",{children:"West Bay, Doha, Qatar"}),v.jsx("span",{children:"P.O. Box 12345"})]}),v.jsxs("div",{className:"text-[14px] text-white/60 flex flex-col gap-1 mb-6",children:[v.jsx("span",{children:"T: +974 4XXX XXXX"}),v.jsx("a",{href:"mailto:info@alrazahholding.com",className:"hover:text-white transition-colors",children:"E: info@alrazahholding.com"})]}),v.jsx("div",{className:"flex items-center gap-4",children:[fC,CC,AC].map((t,e)=>v.jsx("a",{href:"#","aria-label":"social",className:"text-white/60 hover:text-white transition-colors",children:v.jsx(t,{className:"w-5 h-5",strokeWidth:1.5})},e))})]}),iM.map(t=>v.jsxs("div",{children:[v.jsx("h3",{className:"text-[14px] uppercase font-bold tracking-[0.04em] text-white mb-6",children:t.title}),v.jsx("ul",{className:"flex flex-col gap-3",children:t.links.map(e=>v.jsx("li",{children:v.jsx("a",{href:"#",className:"group inline-flex items-center text-[14px] text-white/60 hover:text-white transition-all duration-200 hover:translate-x-1",children:e})},e))})]},t.title))]}),v.jsxs("div",{className:"mt-12 pt-6 border-t border-white/10 flex flex-col md:flex-row items-center justify-between gap-4 text-[12px] text-white/40",children:[v.jsx("p",{children:"© 2026 Alrazah Holding Q.P.S.C. All rights reserved."}),v.jsx("p",{className:"hidden md:block",children:"Qatar Stock Exchange Listed Entity | QFMA Regulated"}),v.jsxs("div",{className:"flex items-center gap-4",children:[v.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Privacy Policy"}),v.jsx("span",{className:"text-white/20",children:"|"}),v.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Terms of Use"}),v.jsx("span",{className:"text-white/20",children:"|"}),v.jsx("a",{href:"#",className:"hover:text-white transition-colors",children:"Sitemap"})]})]})]})})}function aM(){return v.jsxs("div",{className:"bg-white",children:[v.jsx(JN,{}),v.jsx(e2,{}),v.jsxs("main",{children:[v.jsx(IL,{}),v.jsx("div",{id:"manifesto",children:v.jsx(VL,{})}),v.jsx("div",{id:"framework",children:v.jsx(BL,{})}),v.jsx(HL,{}),v.jsx(QL,{}),v.jsx(GL,{}),v.jsx(ZL,{}),v.jsx(nM,{}),v.jsx(sM,{})]}),v.jsx(oM,{})]})}const lM=()=>{const{isLoadingAuth:t,isLoadingPublicSettings:e,authError:n,navigateToLogin:s}=KN();if(e||t)return v.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:v.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return v.jsx(GN,{});if(n.type==="auth_required")return s(),null}return v.jsxs(Kk,{children:[v.jsx(lf,{path:"/our-business/project-management/delivery-standards",element:v.jsx(aM,{})}),v.jsx(lf,{path:"*",element:v.jsx(qN,{})})]})};function uM(){return v.jsx(QN,{children:v.jsxs(GT,{client:lk,children:[v.jsxs(Yk,{children:[v.jsx(YN,{}),v.jsx(lM,{})]}),v.jsx(ET,{})]})})}jE.createRoot(document.getElementById("root")).render(v.jsx(uM,{}));